Angular HtmlEditor - converter

Allows you to convert an HTML Editor value between different markups.

Selector: dxo-converter
Type:

Converter

| undefined
Default Value: undefined

app.component.ts
app.component.html
  • export class AppComponent {
  • toHtml(value) {
  • const result = */ Convert the value and return a string */
  • return result;
  • }
  •  
  • fromHtml(value) {
  • const result = /* Convert the value and return a string */
  • return result;
  • }
  • }
  • <dx-html-editor>
  • <dxo-converter
  • (toHtml)="toHtml"
  • (fromHtml)="fromHtml"
  • >
  • </dxo-converter>
  • </dx-html-editor>

View Demo

fromHtml

A function that converts an HTML Editor value from HTML to another markup language.

Type:

Function

Function parameters:
value:

String

The HTML Editor value.

Return Value:

String

The converted value.

toHtml

A function that converts an HTML Editor value from a markup language to HTML.

Type:

Function

Function parameters:
value:

String

The HTML Editor value.

Return Value:

String

The converted value.