React HtmlEditor Types
AIChangeStyleCommand
Specifies a "change style" command for the "ai" toolbar item.
To allow users to use this command, add its name to the commands array:
- 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.
AIChangeToneCommand
Specifies a "change tone" command for the "ai" toolbar item.
To allow users to use this command, add its name to the commands array:
- 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.
AICommand
The union of all command types.
AICommandBase
Specifies basic options for the "ai" toolbar item commands.
AICommandName
All predefined command names.
AICommandNameExtended
An extended type for command names. Includes predefined and custom command names.
AICustomCommand
Specifies a custom command for the "ai" toolbar item.
To define a custom command, do the following:
- Set
nameto "custom". - Define
textfor the title in the command list. - Create a prompt.
- 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>
- );
- }
AITranslateCommand
Specifies a "translate" command for the "ai" toolbar item.
To allow users to use this command, add its name to the commands array:
- 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.
ContentReadyEvent
The type of the contentReady event handler's argument.
Used in:
Converter
An object that configures converter settings.
DisposingEvent
The type of the disposing event handler's argument.
Used in:
FocusInEvent
The type of the focusIn event handler's argument.
Used in:
FocusOutEvent
The type of the focusOut event handler's argument.
Used in:
HtmlEditorFormat
Specifies a format of the selected content.
HtmlEditorImageUploadMode
Specifies how the HTML Editor UI component uploads files.
HtmlEditorPredefinedContextMenuItem
Configures context menu items.
HtmlEditorPredefinedToolbarItem
Configures toolbar items.
InitializedEvent
The type of the initialized event handler's argument.
Used in:
OptionChangedEvent
The type of the optionChanged event handler's argument.
Used in:
ValueChangedEvent
The type of the valueChanged event handler's argument.
Used in: