Home Manual Reference Source Test Repository
import {Nl2brPipe} from '@cedx/ngx-core/src/pipes/nl2br_pipe.js'
public class | source

Nl2brPipe

Formats strings according to given patterns.

Test:

Static Member Summary

Static Public Members
public static get

The class decorators.

Method Summary

Public Methods
public

transform(value: string, isXhtml: boolean): string

Inserts HTML line breaks before all new lines in the specified value.

Static Public Members

public static get annotations: Array source

The class decorators.

Public Methods

public transform(value: string, isXhtml: boolean): string source

Inserts HTML line breaks before all new lines in the specified value.

Params:

NameTypeAttributeDescription
value string

A string to format.

isXhtml boolean
  • optional

Value indicating whether to insert XHTML compatible line breaks.

Return:

string

The formatted string.

Test: