ngx-multiline
v1.2.0
Published
Plugin for Angular providing a pipe to display multiline text
Maintainers
Readme
ngx-multiline
Plugin for Angular (>=7.2.0) providing a pipe to display multiline text.
Installation
For use in an existing angular project run npm install ngx-multiline.
Now add the installed module to your app.module.ts:
import { MultilineModule } from 'ngx-multiline';
// ...
@NgModule({
// ...
imports: [
// ...
MultilineModule
]
// ...
})
export class AppModule { }Usage
Anywhere in your template:
<div [innerHtml]="somePreformattedText | multiline"></div>The pipe will transform every \n to a <br/>. Every \n\n will result in a </p><p>.
The plugin does work for Windows end-of-line sequence \r\n as well.
License
MIT - Vinado - Built with :heart: in Dresden
