React HtmlEditor Types

AIChangeStyleCommand

Specifies a "change style" command for the "ai" toolbar item.

import { HtmlEditorTypes } from "devextreme-react/html-editor"
Type: HtmlEditorTypes.AIChangeStyleCommand
Accepted Values: 'changeStyle'

To allow users to use this command, add its name to the commands array:

App.tsx
  • import React from 'react';
  • import HtmlEditor, { Toolbar, Item, Command } from 'devextreme-react/html-editor';
  •  
  • export default function App() {
  • return (
  • <HtmlEditor
  • aiIntegration={aiIntegration}
  • >
  • <Toolbar>
  • <Item name="ai">
  • <Command name="changeStyle" />
  • <Command name="changeTone" />
  • </Item>
  • </Toolbar>
  • </HtmlEditor>
  • );
  • }

AIChangeStyleOption

Includes all predefined options for the "change style" command.

Accepted Values: 'formal' | 'informal' | 'technical' | 'business' | 'creative' | 'journalistic' | 'academic' | 'persuasive' | 'narrative' | 'expository' | 'descriptive' | 'conversational'

AIChangeToneCommand

Specifies a "change tone" command for the "ai" toolbar item.

import { HtmlEditorTypes } from "devextreme-react/html-editor"
Type: HtmlEditorTypes.AIChangeToneCommand
Accepted Values: 'changeTone'

To allow users to use this command, add its name to the commands array:

App.tsx
  • import React from 'react';
  • import HtmlEditor, { Toolbar, Item, Command } from 'devextreme-react/html-editor';
  •  
  • export default function App() {
  • return (
  • <HtmlEditor
  • aiIntegration={aiIntegration}
  • >
  • <Toolbar>
  • <Item name="ai">
  • <Command name="changeStyle" />
  • <Command name="changeTone" />
  • </Item>
  • </Toolbar>
  • </HtmlEditor>
  • );
  • }

AIChangeToneOption

Includes all predefined options for the "change tone" command.

Accepted Values: 'professional' | 'casual' | 'straightforward' | 'confident' | 'friendly'

AICommand

The union of all command types.

import { HtmlEditorTypes } from "devextreme-react/html-editor"
Type: HtmlEditorTypes.AICommand
Accepted Values: 'summarize'

AICommandBase

Specifies basic options for the "ai" toolbar item commands.

import { HtmlEditorTypes } from "devextreme-react/html-editor"

AICommandName

All predefined command names.

Accepted Values: 'summarize' | 'proofread' | 'expand' | 'shorten' | 'changeStyle' | 'changeTone' | 'translate' | 'askAI'

AICommandNameExtended

An extended type for command names. Includes predefined and custom command names.

import { HtmlEditorTypes } from "devextreme-react/html-editor"
Type: HtmlEditorTypes.AICommandNameExtended
Accepted Values: 'custom'

AICustomCommand

Specifies a custom command for the "ai" toolbar item.

import { HtmlEditorTypes } from "devextreme-react/html-editor"

To define a custom command, do the following:

  • Set name to "custom".
  • Define text for the title in the command list.
  • Create a prompt.
App.tsx
  • import React from 'react';
  • import HtmlEditor, { Toolbar, Item, Command } from 'devextreme-react/html-editor';
  •  
  • const targetAudiencePrompt = () => {
  • return 'Based on the text, who is the most likely target audience? Give a short explanation';
  • }
  •  
  • export default function App() {
  • return (
  • <HtmlEditor
  • aiIntegration={aiIntegration}
  • >
  • <Toolbar>
  • <Item name="ai">
  • <Command
  • name="custom"
  • text="Target Audience"
  • prompt={targetAudiencePrompt}
  • />
  • </Item>
  • </Toolbar>
  • </HtmlEditor>
  • );
  • }

AIToolbarItem

The 'ai' toolbar item.

import { HtmlEditorTypes } from "devextreme-react/html-editor"

AITranslateCommand

Specifies a "translate" command for the "ai" toolbar item.

import { HtmlEditorTypes } from "devextreme-react/html-editor"
Type: HtmlEditorTypes.AITranslateCommand
Accepted Values: 'translate'

To allow users to use this command, add its name to the commands array:

App.tsx
  • import React from 'react';
  • import HtmlEditor, { Toolbar, Item, Command } from 'devextreme-react/html-editor';
  •  
  • export default function App() {
  • return (
  • <HtmlEditor
  • aiIntegration={aiIntegration}
  • >
  • <Toolbar>
  • <Item name="ai">
  • <Command name="translate" />
  • </Item>
  • </Toolbar>
  • </HtmlEditor>
  • );
  • }

AITranslateOption

Includes all predefined options for the "translate" command.

Accepted Values: 'arabic' | 'chinese' | 'english' | 'french' | 'german' | 'japanese' | 'spanish'

ContentReadyEvent

The type of the contentReady event handler's argument.

import { HtmlEditorTypes } from "devextreme-react/html-editor"
Type: HtmlEditorTypes.ContentReadyEvent

Converter

An object that configures converter settings.

import { HtmlEditorTypes } from "devextreme-react/html-editor"
Type: HtmlEditorTypes.Converter

DisposingEvent

The type of the disposing event handler's argument.

import { HtmlEditorTypes } from "devextreme-react/html-editor"
Type: HtmlEditorTypes.DisposingEvent

FocusInEvent

The type of the focusIn event handler's argument.

import { HtmlEditorTypes } from "devextreme-react/html-editor"
Type: HtmlEditorTypes.FocusInEvent

FocusOutEvent

The type of the focusOut event handler's argument.

import { HtmlEditorTypes } from "devextreme-react/html-editor"
Type: HtmlEditorTypes.FocusOutEvent

HtmlEditorFormat

Specifies a format of the selected content.

Accepted Values: 'background' | 'bold' | 'color' | 'font' | 'italic' | 'link' | 'size' | 'strike' | 'script' | 'underline' | 'blockquote' | 'header' | 'indent' | 'list' | 'align' | 'code-block'

HtmlEditorImageUploadMode

Specifies how the HTML Editor UI component uploads files.

Accepted Values: 'base64' | 'server' | 'both'

HtmlEditorImageUploadTab

Specifies the tab's name.

Accepted Values: 'url' | 'file'

HtmlEditorPredefinedContextMenuItem

Configures context menu items.

Accepted Values: 'background' | 'bold' | 'color' | 'font' | 'italic' | 'link' | 'image' | 'strike' | 'subscript' | 'superscript' | 'underline' | 'blockquote' | 'increaseIndent' | 'decreaseIndent' | 'orderedList' | 'bulletList' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'codeBlock' | 'variable' | 'undo' | 'redo' | 'clear' | 'insertTable' | 'insertHeaderRow' | 'insertRowAbove' | 'insertRowBelow' | 'insertColumnLeft' | 'insertColumnRight' | 'deleteColumn' | 'deleteRow' | 'deleteTable' | 'cellProperties' | 'tableProperties'

HtmlEditorPredefinedToolbarItem

Configures toolbar items.

Accepted Values: 'background' | 'bold' | 'color' | 'font' | 'italic' | 'link' | 'image' | 'size' | 'strike' | 'subscript' | 'superscript' | 'underline' | 'blockquote' | 'header' | 'increaseIndent' | 'decreaseIndent' | 'orderedList' | 'bulletList' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'codeBlock' | 'variable' | 'separator' | 'undo' | 'redo' | 'clear' | 'cellProperties' | 'tableProperties' | 'insertTable' | 'insertHeaderRow' | 'insertRowAbove' | 'insertRowBelow' | 'insertColumnLeft' | 'insertColumnRight' | 'deleteColumn' | 'deleteRow' | 'deleteTable' | 'ai'

InitializedEvent

The type of the initialized event handler's argument.

import { HtmlEditorTypes } from "devextreme-react/html-editor"
Type: HtmlEditorTypes.InitializedEvent

OptionChangedEvent

The type of the optionChanged event handler's argument.

import { HtmlEditorTypes } from "devextreme-react/html-editor"
Type: HtmlEditorTypes.OptionChangedEvent

ValueChangedEvent

The type of the valueChanged event handler's argument.

import { HtmlEditorTypes } from "devextreme-react/html-editor"
Type: HtmlEditorTypes.ValueChangedEvent