Vue HtmlEditor - converter

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

Selector: DxConverter
Type:

Converter

| undefined
Default Value: undefined
App.vue
  • <template>
  • <DxHtmlEditor ...>
  • <DxConverter
  • @to-html="toHtml"
  • @from-html="fromHtml"
  • />
  • </DxHtmlEditor>
  • </template>
  •  
  • <script setup>
  • import DxHtmlEditor, { DxConverter } from 'devextreme-vue/html-editor';
  •  
  • const toHtml: (value) => {
  • const result = */ Convert the value and return a string */
  • return result;
  • }
  •  
  • const fromHtml: (value) => {
  • const result = /* Convert the value and return a string */
  • return result;
  • }
  • </script>

View Demo

fromHtml

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

Selector: from-html
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.

Selector: to-html
Type:

Function

Function parameters:
value:

String

The HTML Editor value.

Return Value:

String

The converted value.