import { Component, ModuleDeclaration, EmitType } from '@syncfusion/ej2-base';
import { INotifyPropertyChanged, L10n } from '@syncfusion/ej2-base';
import { BeforeOpenEventArgs, BeforeCloseEventArgs } from '@syncfusion/ej2-popups';
import { RichTextEditorModel } from './rich-text-editor-model';
import { Render } from '../renderer/render';
import { ViewSource } from '../renderer/view-source';
import { IFormatter, SlashMenuItemSelectArgs, ImageFailedEventArgs, IRenderer, AIAssistantPromptRequestArgs, AIAssistantStopRespondingArgs, BeforePopupOpenCloseEventArgs, AIAssitantToolbarClickEventArgs } from './interface';
import { ToolbarStatusEventArgs } from './interface';
import { ChangeEventArgs, AfterImageDeleteEventArgs, AfterMediaDeleteEventArgs, PasteCleanupArgs } from './interface';
import { ILinkCommandsArgs, ImageDropEventArgs, IImageCommandsArgs, IAudioCommandsArgs, IVideoCommandsArgs, BeforeSanitizeHtmlArgs, ITableCommandsArgs, ExecuteCommandOption, ICodeBlockCommandsArgs, MediaDropEventArgs, ExportingEventArgs } from '../../common/interface';
import { ActionCompleteEventArgs, ActionBeginEventArgs, ClipboardWriteEventArgs, ImageSuccessEventArgs, ResizeArgs, BeforeQuickToolbarOpenArgs, SelectionChangedEventArgs } from '../../common/interface';
import { ServiceLocator } from '../services/service-locator';
import { EditorMode, ShiftEnterKey, EnterKey } from './../../common/types';
import { Toolbar } from '../actions/toolbar';
import { KeyboardEvents } from '../actions/keyboard';
import { FontFamilyModel, FontSizeModel, FontColorModel, FormatModel, BackgroundColorModel, NumberFormatListModel, BulletFormatListModel, CodeBlockSettingsModel, LineHeightModel } from '../../models/models';
import { ToolbarSettingsModel, IFrameSettingsModel, ImageSettingsModel, AudioSettingsModel, VideoSettingsModel, TableSettingsModel, EmojiSettingsModel } from '../../models/models';
import { QuickToolbarSettingsModel, InlineModeModel, PasteCleanupSettingsModel, FormatPainterSettingsModel, ImportWordModel, ExportWordModel, ExportPdfModel } from '../../models/models';
import { AIAssistantSettingsModel, FileManagerSettingsModel } from '../models/models';
import { Link } from '../renderer/link-module';
import { Image } from '../renderer/image-module';
import { Audio } from '../renderer/audio-module';
import { Video } from '../renderer/video-module';
import { Table } from '../renderer/table-module';
import { Count } from '../actions/count';
import { HtmlEditor } from '../actions/html-editor';
import { MarkdownEditor } from '../actions/markdown-editor';
import { BaseToolbar } from '../actions/base-toolbar';
import { QuickToolbar } from '../actions/quick-toolbar';
import { FullScreen } from '../actions/full-screen';
import { PasteCleanup } from '../actions/paste-clean-up';
import { ImportExport } from '../actions/import-export';
import { SelectedEventArgs, RemovingEventArgs, UploadingEventArgs, BeforeUploadEventArgs } from '@syncfusion/ej2-inputs';
import { Resize } from '../actions/resize';
import { FileManager } from '../actions/file-manager';
import { FormatPainter } from '../actions/format-painter';
import { EmojiPicker } from '../actions/emoji-picker';
import { SlashMenuSettingsModel } from '../../models/slash-menu-settings-model';
import { SlashMenu } from '../renderer/slash-menu';
import { CustomUserAgentData } from '../../common/user-agent';
import { CodeBlock } from '../actions/code-block';
import { ClipBoardCleanup } from '../actions/clipboard-cleanup';
import { CommandName, DialogType } from '../../common/enum';
import { AIAssistant } from '../renderer/ai-assistant';
import { PromptModel } from '@syncfusion/ej2-interactive-chat';
import { AutoFormat } from '../actions';
/**
* Represents the Rich Text Editor component.
* ```html
*
*
* ```
*/
export declare class RichTextEditor extends Component implements INotifyPropertyChanged {
private placeHolderWrapper;
/**
* Provides the Scrollable parent element from the Root element.
*
* @hidden
*
*/
scrollParentElements: HTMLElement[];
private cloneValue;
private onFocusHandler;
private onBlurHandler;
private onResizeHandler;
private onLoadHandler;
private timeInterval;
private autoSaveTimeOut;
private idleInterval;
private touchModule;
private defaultResetValue;
private isResizeInitialized;
private isValueChangeBlurhandler;
private displayTempElem;
private beforeRenderClassValue;
private mouseDownDebListener;
private internalID;
private mutationObserver;
private hasContentChanged;
isModalDialog: boolean;
private isToolbarClipboardAction;
/**
* @private
*/
userAgentData: CustomUserAgentData;
/**
* Specifies the root container of the Rich Text Editor component.
*
* @hidden
*
**/
rootContainer: HTMLElement;
/**
* @hidden
*/
currentTarget: HTMLElement;
/**
* @hidden
*/
isFocusOut: boolean;
/**
* @hidden
*/
inputElement: HTMLElement;
/**
* @hidden
*/
isRTE: boolean;
/**
* @hidden
*/
isBlur: boolean;
/**
* @hidden
*/
renderModule: Render;
/**
* @hidden
*/
contentModule: IRenderer;
/**
* @hidden
*/
serviceLocator: ServiceLocator;
/**
* The `toolbarModule` is used to manipulate ToolBar items and its action in the RichTextEditor.
*
* @hidden
*/
toolbarModule: Toolbar;
/**
* @hidden
*/
imageModule: Image;
/**
* @hidden
*/
audioModule: Audio;
/**
* @hidden
*/
videoModule: Video;
/**
* @hidden
*/
tableModule: Table;
/**
* @hidden
*/
fullScreenModule: FullScreen;
/**
* @hidden
*/
resizeModule: Resize;
/**
* @hidden
*/
clipBoardCleanupModule: ClipBoardCleanup;
/**
* @hidden
*/
pasteCleanupModule: PasteCleanup;
/**
* @hidden
*/
codeBlockModule: CodeBlock;
/**
* @hidden
*/
autoFormatModule: AutoFormat;
/**
* @hidden
*/
importExportModule: ImportExport;
/**
* @hidden
*/
sourceCodeModule: ViewSource;
/**
* @hidden
*/
linkModule: Link;
/**
* @hidden
*/
markdownEditorModule: MarkdownEditor;
/**
* @hidden
*/
htmlEditorModule: HtmlEditor;
/**
* @hidden
*/
quickToolbarModule: QuickToolbar;
/**
* @hidden
*/
countModule: Count;
/**
* @hidden
*/
fileManagerModule: FileManager;
/**
* @hidden
*/
formatPainterModule: FormatPainter;
slashMenuModule: SlashMenu;
aiAssistantModule: AIAssistant;
/**
* @hidden
*/
emojiPickerModule: EmojiPicker;
needsID: boolean;
/**
* Specifies the configuration for the toolbar, including the alignment and rendering type.
* By default, the toolbar floats at the top of the RichTextEditor.
* When you scroll down, the toolbar will move with the page applying the specified offset.
*
* Properties:
*
* - enable: A boolean value to show or hide the toolbar.
*
* - enableFloating: A boolean value to enable or disable the floating toolbar.
* This keeps the toolbar fixed at the top of the RichTextEditor during scrolling.
*
* - type: Defines the toolbar type, with the following options:
* 1. Expand: Overflowing toolbar items are hidden and can be accessed by clicking the expand arrow.
* 2. MultiRow: Overflowing toolbar items wrap into the next row.
* 3. Scrollable: Toolbar items are on a single line and can be scrolled horizontally if they overflow.
* 4. Popup: Overflowing toolbar items wrap into a popup container.
*
* - position: Defines the toolbar position, with the following options:
* 1. Top: Positions the toolbar at the top of the RichTextEditor.
* 2. Bottom: Positions the toolbar at the bottom of the RichTextEditor.
*
* - items: An array specifying the items aligned horizontally in the toolbar.
* > '|' and '-' can be used to insert vertical and horizontal separator lines in the toolbar.
*
* - itemConfigs: Allows the modification of the default toolbar item configuration, such as the icon class.
*
* > By default, the toolbar is rendered with a scrollable option on mobile devices and does not support other toolbar types.
*
* {% codeBlock src='rich-text-editor/toolbar-settings/index.md' %}{% endcodeBlock %}
*
* @default
* {
* enable: true,
* enableFloating: true,
* position: ToolbarPosition.Top,
* type: ToolbarType.Expand,
* items: ['Bold', 'Italic', 'Underline', '|', 'Formats', 'Alignments', 'OrderedList',
* 'UnorderedList', '|', 'CreateLink', 'Image', '|', 'SourceCode', 'Undo', 'Redo'],
* itemConfigs: {}
* }
*/
toolbarSettings: ToolbarSettingsModel;
/**
* Configuration options for the slash menu feature in the Editor, used to display a mention popup.
* Properties:
* * enable: A boolean indicating whether the slash menu is enabled in the Editor.
* * items: An array specifying the list of items to be displayed in the slash menu.
* * popupWidth: Defines the width of the slash menu popup. Accepts values in pixels, numbers, or percentages. Numeric values are treated as pixels.
* * popupHeight: Defines the height of the slash menu popup. Accepts values in pixels, numbers, or percentages. Numeric values are treated as pixels.
*
* @default
* {
* enable: false,
* items: ['Paragraph', 'Heading 1', 'Heading 2', 'Heading 3', 'Heading 4', 'OrderedList', 'UnorderedList',
* 'CodeBlock', 'BlockQuote'],
* popupWidth: '300px',
* popupHeight: '320px'
* }
*/
slashMenuSettings: SlashMenuSettingsModel;
/**
* Configures the AI Assistant functionality settings for the Rich Text Editor component.
*
* This property allows you to customize various aspects of the AI Assistant feature including:
* * Predefined AI commands in the dropdown menu
* * Popup dimensions and appearance
* * Placeholder text for the AI prompt input
* * Toolbar configurations for different sections
* * Custom prompts and suggestions
* * Banner template customization
*
* @default {
* commands: DEFAULT_AI_COMMANDS,
* popupWidth: '600px',
* popupMaxHeight: '400px',
* placeholder: 'Ask AI to rewrite or generate content.' ,
* headerToolbarSettings : ['AIcommands', 'Close'],
* promptToolbarSettings: ['Edit', 'Copy'],
* responseToolbarSettings: ['Regenerate', 'Copy', '|', 'Insert'],
* prompts: [],
* suggestions: [],
* bannerTemplate: '',
* maxPromptHistory: 20
* }
*
*/
aiAssistantSettings: AIAssistantSettingsModel;
/**
* Specifies the items to be rendered in the quick toolbar based on the target element.
* Properties:
* * enable: Boolean to show or hide the quick toolbar.
* * actionOnScroll: Options for quick toolbar behavior on scroll:
* 1. hide: The quick toolbar closes when the parent element is scrolled.
* 2. none: The quick toolbar stays open even if the parent element is scrolled.
* * link: Specifies items in the quick toolbar for links ('Open', 'Edit', 'UnLink').
* * image: Specifies items in the quick toolbar for images ('Replace', 'Align', 'Caption', 'WrapText', 'Remove', 'InsertLink', 'Display', 'AltText', 'Dimension').
* * text: Specifies items in the quick toolbar for text ('Cut', 'Copy', 'Paste').
* * audio: Specifies items for audio ('AudioReplace', 'AudioRemove', 'AudioLayoutOption').
* * video: Specifies items for video ('VideoReplace', 'VideoAlign', 'VideoRemove', 'VideoLayoutOption', 'VideoDimension').
* * enableAppendToBody: Boolean to enable or disable appending the quick toolbar to the body.
*
* {% codeBlock src='rich-text-editor/quick-toolbar-settings/index.md' %}{% endcodeBlock %}
*
* @default
* {
* enable: true,
* actionOnScroll: 'none',
* link: ['Open', 'Edit', 'UnLink'],
* table: ['Tableheader', 'TableRemove', '|', 'TableRows', 'TableColumns', '|' , 'Styles', 'BackgroundColor', 'Alignments', 'TableCellVerticalAlign'],
* image: ['AltText', 'Caption', '|', 'Align', 'Display', 'WrapText', '|', 'InsertLink', 'OpenImageLink', 'EditImageLink', 'RemoveImageLink', '|', 'Dimension', 'Replace', 'Remove'],
* audio: ['AudioLayoutOption', 'AudioReplace', 'AudioRemove'],
* video: ['VideoLayoutOption', 'VideoAlign', '|', 'VideoDimension', 'VideoReplace', 'VideoRemove'],
* enableAppendToBody: false,
* }
*/
quickToolbarSettings: QuickToolbarSettingsModel;
/**
* Enables or disables the Clipboard Cleanup feature. When set to `true`, copy and cut operations are intercepted to remove unwanted inline styles.
*
* @default true
*/
enableClipboardCleanup: boolean;
/**
* Configures paste options in the Rich Text Editor.
* Properties:
* * prompt: Boolean to enable or disable paste prompt.
* * deniedAttrs: Attributes to restrict during paste.
* * allowedStyleProps: Style properties allowed when pasting.
* * deniedTags: Tags to restrict when pasting.
* * keepFormat: Boolean to keep or remove format when pasting.
* * plainText: Boolean to paste as plain text.
*
* {% codeBlock src='rich-text-editor/paste-cleanup-settings/index.md' %}{% endcodeBlock %}
*
* @default
* {
* prompt: false,
* deniedAttrs: null,
* allowedStyleProps: ['background', 'background-color', 'border', 'border-bottom', 'border-left', 'border-radius',
* 'border-right', 'border-style', 'border-top', 'border-width', 'clear', 'color', 'cursor',
* 'direction', 'display', 'float', 'font', 'font-family', 'font-size', 'font-weight', 'font-style',
* 'height', 'left', 'line-height', 'list-style-type', 'margin', 'margin-top', 'margin-left',
* 'margin-right', 'margin-bottom', 'max-height', 'max-width', 'min-height', 'min-width',
* 'overflow', 'overflow-x', 'overflow-y', 'padding', 'padding-bottom', 'padding-left', 'padding-right',
* 'padding-top', 'position', 'right', 'table-layout', 'text-align', 'text-decoration', 'text-transform', 'text-indent',
* 'top', 'vertical-align', 'visibility', 'white-space', 'width', 'flex-direction'],
* deniedTags: null,
* keepFormat: true,
* plainText: false
* }
*/
pasteCleanupSettings: PasteCleanupSettingsModel;
/**
* Configures the format painter options in the Rich Text Editor.
* Properties:
* * allowedFormats: Tags selectors that allow format copying.
* * deniedFormats: Tag selectors that prevent format copying.
*
* {% codeBlock src='rich-text-editor/format-painter-settings/index.md' %}{% endcodeBlock %}
*
* @default
* {
* allowedFormats: 'b; em; font; sub; sup; kbd; i; s; u; code; strong; span; p; div; h1; h2; h3; h4; h5; h6; blockquote; ol; ul; li; pre;',
* deniedFormats: null
* }
*/
formatPainterSettings: FormatPainterSettingsModel;
/**
* Configures emoji picker options in the Rich Text Editor.
* Properties:
* * iconsSet: Array representing emoji icons.
* * showSearchBox: Enables/disables the search box.
*
*
*/
emojiPickerSettings: EmojiSettingsModel;
/**
* Configures iframe mode items in the Rich Text Editor.
* Properties:
* * enable: Boolean to place editor content in an iframe, isolating it from the page.
* * attributes: Custom style for displaying content inside the iframe. Applied to iframe body.
* * resources: Adds styles and scripts to the iframe.
* 1. styles[]: Array of CSS files for the iframe content.
* 2. scripts[]: Array of JS script files for the iframe.
* * metaTags[]: Array of meta tags for iframe's head, setting metadata (http-equiv, charset, etc.).
* * sandbox: String array defining iframe sandbox attributes, controlling security restrictions. Default includes "allow-same-origin".
*
* {% codeBlock src='rich-text-editor/iframe-settings/index.md' %}{% endcodeBlock %}
*
* @default
* {
* enable: false,
* attributes: null,
* resources: { styles: [], scripts: [] },
* metaTags: [],
* sandbox: null,
* }
*/
iframeSettings: IFrameSettingsModel;
/**
* Specifies the options for inserting images in the Rich Text Editor. Includes properties such as:
* - `allowedTypes`: Specifies the allowed image file extensions as a comma-separated list (e.g., '.jpg', '.png').
* - `display`: Sets the default display mode for an inserted image, either 'inline' or 'block'.
* - `width`: Specifies the default width for an inserted image.
* - `saveFormat`: Indicates the format for storing images in the editor (Base64 or Blob).
* > Select Base64 for numerous small images without a specific physical storage location.
* - `height`: Defines the default height for an inserted image.
* - `saveUrl`: Specifies the URL for the service that handles image upload and storage on the server.
* - `path`: Determines the storage location for images and their display path.
* - `maxFileSize`: Sets the maximum file size allowed for image uploads.
*
* {% codeBlock src='rich-text-editor/insert-image-settings/index.md' %}{% endcodeBlock %}
*
* @default
* {
* allowedTypes: ['.jpeg', '.jpg', '.png'],
* display: 'inline',
* width: 'auto',
* height: 'auto',
* saveFormat: 'Blob',
* saveUrl: null,
* path: null,
* maxFileSize: 30000000
* }
*/
insertImageSettings: ImageSettingsModel;
/**
* Configures the options for importing Word files in the Rich Text Editor component.
* The `serviceUrl` property specifies the server endpoint URL where the uploaded Word file will be processed.
*
* @default
* {
* serviceUrl: null
* }
*/
importWord: ImportWordModel;
/**
* Defines file export options for the Rich Text Editor with properties like:
* - `serviceurl`: The URL utilized for exporting editor content to Word files.
* - `fileName`: Designates the default name for exported Word files.
* - `stylesheet`: Applies a stylesheet to the exported Word file.
*
* @default
* {
* serviceUrl: null,
* fileName: Sample.docx,
* stylesheet: null
* }
*/
exportWord: ExportWordModel;
/**
* Describes file export options to PDF in the Rich Text Editor, such as:
* - `serviceurl`: URL used for exporting content to PDF format.
* - `fileName`: Specifies the default PDF file name upon export.
* - `stylesheet`: Applies a stylesheet to the exported PDF file.
*
* @default
* {
* serviceUrl: null,
* fileName: 'Sample.pdf',
* stylesheet: null
* }
*/
exportPdf: ExportPdfModel;
/**
* Defines the options for inserting audio files in the Rich Text Editor, including properties such as:
* - `allowedTypes`: Specifies the file extensions for audio files allowed to be inserted, listed as a comma-separated string (e.g., '.wav', '.mp3').
* - `layoutOption`: Sets the default layout for audio files when inserted into the Rich Text Editor. The options are 'Inline' and 'Break'.
* - `saveFormat`: Determines the format used to store audio files in the Rich Text Editor, either 'Base64' or 'Blob'.
* > Choose 'Base64' for frequently inserted small audio files without the need for a specific storage location.
* - `saveUrl`: Provides the service URL responsible for handling audio file uploads and storage on the server.
* - `path`: Specifies the storage path for audio files and the reference for displaying them.
* - `maxFileSize`: Sets the maximum file size allowed for audio file uploads.
*
* @default
* {
* allowedTypes: ['.wav', '.mp3', '.m4a', '.wma'],
* layoutOption: 'Inline',
* saveFormat: 'Blob',
* saveUrl: null,
* path: null,
* maxFileSize: 30000000
* }
*/
insertAudioSettings: AudioSettingsModel;
/**
* Specifies video insert options in the Rich Text Editor, detailing properties such as:
* - `allowedTypes`: Allowed video file extensions as a comma-separated list (e.g., '.mp4', '.mov').
* - `layoutOption`: Determines the display mode for videos ('Inline' or 'Break').
* - `width`: Sets default width for inserted videos.
* - `saveFormat`: Format for storing video files (Base64 or Blob).
* > Select Base64 for numerous small video inserts without defined storage requirements.
* - `height`: Sets default height for inserted videos.
* - `saveUrl`: URL of the service for handling video uploads and server storage.
* - `path`: Identifies the path for storing and displaying videos.
* - `maxFileSize`: Maximum file size allowed for video uploads.
*
* @default
* {
* allowedTypes: ['.mp4', '.mov', '.wmv', '.avi'],
* layoutOption: 'Inline',
* width: 'auto',
* height: 'auto',
* saveFormat: 'Blob',
* saveUrl: null,
* path: null,
* maxFileSize: 30000000
* }
*/
insertVideoSettings: VideoSettingsModel;
/**
* Specifies the options for inserting tables in the Rich Text Editor, featuring properties like:
* - `styles`: Automatically appends a CSS class to tables for consistent styling.
* - `width`: Defines default table width upon insertion.
* - `minWidth`: Sets the minimum width for inserted tables.
* - `maxWidth`: Indicates the maximum permissible width for tables.
* - `resize`: Enables or disables table resizing functionality.
*
* {% codeBlock src='rich-text-editor/table-settings/index.md' %}{% endcodeBlock %}
*
* @default
* {
* width: '100%',
* styles: [
* { text: 'Dashed Borders', class: 'e-dashed-borders', command: 'Table', subCommand: 'Dashed' },
* { text: 'Alternate Rows', class: 'e-alternate-rows', command: 'Table', subCommand: 'Alternate' }
* ],
* resize: true,
* minWidth: 0,
* maxWidth: null
* }
*/
tableSettings: TableSettingsModel;
/**
* Keeps the toolbar fixed at the top of the Rich Text Editor during scrolling and specifies the
* toolbar's offset from the document's top position.
*
* @default 0
*/
floatingToolbarOffset: number;
/**
* Configures the inline edit mode for the Rich Text Editor with the following options:
* - `enable`: A boolean value to enable or disable the inline edit mode.
* - `onSelection`: Determines how the toolbar is activated:
* - If set to `true`, the toolbar appears inline upon text selection.
* - If set to `false`, the toolbar opens when clicking on the target element.
*
* {% codeBlock src='rich-text-editor/inline-mode/index.md' %}{% endcodeBlock %}
*
* @default
* {
* enable: false,
* onSelection: true
* }
*/
inlineMode: InlineModeModel;
/**
* Defines image manager options in the Rich Text Editor with the following attributes:
* - `enable`: Boolean to enable or disable the image manager.
* - `ajaxSettings`: Configures AJAX settings for image handling.
* - `contextMenuSettings`: Manages context menu availability and options.
* - `navigationPaneSettings`: Sets up the navigation pane display and contents.
* - `toolbarSettings`: Specifies toolbar configuration and visible items.
* - `uploadSettings`: Manages upload-specific configurations.
*
* @default
* {
* enable: false,
* path: '/',
* ajaxSettings: { getImageUrl: null, url: null, uploadUrl: null },
* contextMenuSettings: {
* visible: true,
* file: ['Open', '|', 'Cut', 'Copy', '|', 'Delete', 'Rename', '|', 'Details'],
* folder: ['Open', '|', 'Cut', 'Copy', 'Paste', '|', 'Delete', 'Rename', '|', 'Details'],
* layout: ['SortBy', 'View', 'Refresh', '|', 'Paste', '|', 'NewFolder', 'Upload', '|', 'Details', '|', 'SelectAll']
* },
* navigationPaneSettings: {
* visible: true,
* items: ['NewFolder', 'Upload', 'Cut', 'Copy', 'Paste', 'Delete', 'Download',
* 'Rename', 'SortBy', 'Refresh', 'Selection', 'View', 'Details']
* },
* toolbarSettings: { visible: true, items: ['Upload', 'NewFolder'] },
* uploadSettings: { autoUpload: true, minFileSize: 0, maxFileSize: 30000000, allowedExtensions: '', autoClose: false }
* }
*/
fileManagerSettings: FileManagerSettingsModel;
/**
* Specifies the width of the Rich Text Editor.
*
* @default '100%'
*/
width: string | number;
/**
* Enables or disables the persistence of the component's state between page reloads.
* If enabled, the value of the Rich Text Editor is retained.
*
* {% codeBlock src='rich-text-editor/enable-persistence/index.md' %}{% endcodeBlock %}
*
* @default false
*/
enablePersistence: boolean;
/**
* Configures whether a tooltip should be displayed for the Rich Text Editor toolbar.
*
* @default true
*/
showTooltip: boolean;
/**
* Enables or disables the resizing option in the editor.
* When enabled, the editor can be resized by dragging the resize icon in its bottom right corner.
*
* {% codeBlock src='rich-text-editor/enable-resize/index.md' %}{% endcodeBlock %}
*
* @default false
*/
enableResize: boolean;
/**
* Allows specifying additional HTML attributes like title, name, etc.
* Accepts multiple attributes in a key-value pair format.
*
* @default {}
*/
htmlAttributes: {
[key: string]: string;
};
/**
* Specifies the placeholder text for the content area of the RichTextEditor when it is empty.
*
* @default null
*/
placeholder: string;
/**
* Enables or disables the auto-save option, which performs the save action during idle states after content changes.
* If enabled, the editor will save content in idle state based on the `saveInterval` property's value.
* The change event is triggered if the content has been modified since the last saved state.
*
* @default false
*/
autoSaveOnIdle: boolean;
/**
* Disables user interactions on the component when set to true.
*
* @default false
*/
readonly: boolean;
/**
* Indicates whether the component is enabled or disabled.
*
* {% codeBlock src='rich-text-editor/enabled/index.md' %}{% endcodeBlock %}
*
* @default true
*/
enabled: boolean;
/**
* Indicates whether to allow cross-site scripting (XSS) or not.
*
* @default true
*/
enableHtmlSanitizer: boolean;
/**
* Determines if source code should be displayed in an encoded format.
*
* @default false
*/
enableHtmlEncode: boolean;
/**
* Indicates whether XHTML is enabled or not.
*
* @default false
*/
enableXhtml: boolean;
/**
* Enables or disables the Markdown auto-formatting feature.
* When set to `true`, Markdown syntax typed by the user is automatically
* converted into the corresponding HTML formatting during keypress.
*
* @type {boolean}
* @default true
*/
enableMarkdownAutoFormat: boolean;
/**
* Specifies the height of the Rich Text Editor component.
*
* @default "auto"
*/
height: string | number;
/**
* Specifies the CSS class name appended to the root element of the RichTextEditor.
* Multiple custom CSS classes can be added.
*
* @default null
*/
cssClass: string;
/**
* Specifies the initial content to be displayed in the RichTextEditor's content area. It should be a string.
* The editor's content can also be dynamically loaded from a database, AJAX, etc.
*
* {% codeBlock src='rich-text-editor/value/index.md' %}{% endcodeBlock %}
*
* @default null
*/
value: string;
/**
* Specifies the tag to be inserted when the enter key is pressed.
*
* - `P`: Pressing enter inserts a `p` tag. The default value will be `
`.
* - `DIV`: Inserts a `div` tag instead of the default `P` tag.
* - `BR`: Inserts a `br` tag instead of the default `P` tag.
*
* @default 'P'
*/
enterKey: EnterKey;
/**
* Specifies tags to be inserted when the Shift + Enter keys are pressed.
*
* - `BR` - When the Shift + Enter key is pressed, a `br` tag will be inserted, which is the default behavior.
* - `P` - When the Shift + Enter key is pressed, a `p` tag will be inserted instead of the default `br` tag.
* - `DIV` - When the Shift + Enter key is pressed, a `div` tag will be inserted instead of the default `br` tag.
*
* @default 'BR'
*/
shiftEnterKey: ShiftEnterKey;
/**
* Specifies the number of undo history steps stored in the undo/redo manager.
*
* {% codeBlock src='rich-text-editor/undo-redo-steps/index.md' %}{% endcodeBlock %}
*
* @default 30
*/
undoRedoSteps: number;
/**
* Specifies the interval time in milliseconds for storing actions in the undo/redo manager.
* The minimum value is 300 milliseconds.
*
* @default 300
*/
undoRedoTimer: number;
/**
* Defines the mode of the RichTextEditor.
*
* - `HTML`: Render as an HTML editor using an `