Name | Type | Default | Description |
AutoLoad | bool | false | Automatically loads the last saved state of the editor (from local storage) on element initialization. An id must be provided in order to load a previously saved state. |
AutoSave | bool | false | Automatically saves the current content of the editor. Saving happens at time intervas determined by the autoSaveInterval property while the element on focus. An id must be provided to the element in order to store the state. |
AutoSaveInterval | int | 1000 | The property that determines the interval to automatically save the state of the Editor when the autoSave property is set. |
CharCountFormatFunction | object | N/A | A formatting function for the char counter. Takes two arguments: - chars - the current number of characters inside the Editor.
- maxCharCount - the maximum number of characters inside the Editor.
|
ContentFiltering | EditorContentFiltering | N/A | Determines the content filtering settings. |
ContextMenu | EditorContextMenu | EditorContextMenu.Default | Determines the context menu for the Editor. The context menu is triggered when the user right clicks on the content area of the Editor. |
ContextMenuDataSource | IEnumerable<object> | N/A | Allows to customize default the context menu of the Editor. The property accepts an array of items which can be strings that represent the value of the item, or objects of the following format: { label: string, value: string }, where the label will be displayed and the value will be action value for the item. The property also accepts a function that must return an array of items with the following format function (target: HTMLElement, type: string, defaultItems: string[]) { return defaultItems } and the following arguments: - target - the element that is the target of the context menu.
- type - the type of context menu ( whether it's a table, image, link or other)
- defaultItems - an array of strings which represent the default items for the context menu.
|
DataExport | EditorDataExport | N/A | Sets the Editor's Data Export options. |
Disabled | bool | false | Enables or disables the Editor. |
DisableEditing | bool | false | Disables content editing inside Editor. |
DisableSearchBar | bool | false | Disables the Quick Search Bar. |
EditMode | EditMode | EditMode.Html | Determines the edit mode for the Editor. By default the editor's content accepts and parses HTML. However if set to 'markdown' the Editor can be used as a full time Markdown Editor by parsing the makrdown to HTML in preview mode. |
EnableHtmlEncode | bool | false | Determines whether the value returned from getHTML method and Source Code view are encoded or not. |
EnableTabKey | bool | false | Determines whether the Tab key can insert tab chars inside the Editor or change focus (default) |
FindAndReplaceTimeout | int | 50 | Determines the time interval between results for the find and replace and search bar features. |
HideToolbar | bool | false | Determines whether the Toolbar is hidden or not. |
HideInlineToolbar | bool | false | Determines whether the Inline Toolbar is hidden or not. |
ImageFormat | EditorImageFormat | EditorImageFormat.Base64 | Determines the file format of the image/video that are uploaded from local storage. By default images/videos are stroed as base64. |
InnerHTML | string | "en" | Sets the content of the Editor as HTML. Allows to insert text and HTML. |
InlineToolbarOffset | int[] | new int[]{} | Defines an offset(x,y) for the Inline Toolbar positioning on the page. |
IframeSettings | EditorIframeSettings | N/A | Determines the iframe settings of the Editor. When enabled the contents of the Editor are placed inside an iframe, isolated in a separate dom. The element allows to insert external resources into the iframe if needed. |
Locale | string | "en" | Sets or gets the language. Used in conjunction with the property messages. |
MaxCharCount | int | N/A | Sets a limit on the number of chars inside the Editor. |
Messages | object | N/A | Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property language. |
Name | string | "null" | Sets a to the element which can be used to submit the value of the Editor via a form. |
PasteFormat | PasteFormat | PasteFormat.KeepFormat | Determines the format of the content that will be pasted inside the Editor. |
Placeholder | string | "" | Determines the placeholder that will be shown when there's no content inside the Editor. |
RemoveStylesOnClearFormat | bool | false | Determines whether the clearFormat toolbar action should also remove inline styles from the currently selected node. |
Required | bool | false | Determines whether Editor's content is required ot not. If set and the Editor's content is empty, a notification will appear to notify that the Editor cannot be empty. |
RightToLeft | bool | false | Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. |
Sanitized | bool | false | Determines whether the value is sanitized from XSS content or not. When enabled scripts and other XSS vulnerabilities are not allowed to exist inside the Editor's as HTML content. |
ShowCharCount | bool | false | Determines whether the char counter is visible or not. When enabled it is displayed in the bottom right corner. If maxCharCount is set and the content characters are equal or more than 70% of the maximum char count the counter is colored in order to warn the user. If the char count is equal or more than 90% the counter is again colored with a different warning color to indicate that the counter is near maximum. When maximum is reached, text input is not allowed. |
SplitModeRefreshTimeout | int | 100 | Determines the refresh interval for the Source Code/Preview Panel when Split Mode is enabled. |
Theme | string | "" | Determines the theme. Theme defines the look of the element |
ToolbarItems | IEnumerable<IEditorToolbarItem> | N/A | Determines the Toolbar items list. Each item can be string pointing to the name of the item or an object that defines a custom item or adds aditional settings to an item. The name of the items are case insensitive. An object definition should contain a name attribute that refers to the name of the item when modifing an existing toolbar item. The name attribute determines the action of the item. If set to 'custom' it is possible to create a custom toolbar item. If name attribute is not set or not valid it is treated as a separator, no a toolbar item. The following items are supported by default by the Editor: - SourceCode - shows the HTML/Preview Panel by hiding the input panel. Item type - 'Toggle button'.
- SplitMode - shows both input and HTML/Preview Panel by splitting the Editor content in two sections. Item type - 'Toggle button'
- FullScreen - fits the viewport with the Editor by expanding it over the page content. Item type - 'Toggle button'.
- Alignment - aligns the selected content. Item type - 'Drop down'.
- FontName - changes the font family of the selected content. Item type - 'drop-down'.
- FontSize - changes the font size of the selected content. Item type - 'drop-down'.
- Formats - changes the format of the current selection. Itme type - 'drop-down'.
- TableRows - allows to insert/remove a row into a selected table element. Item type - 'drop-down'.
- TableColumns - allows to insert/remove a column into a selected table element. Itme type - 'drop-down'.
- TableVAlign - sets the vertical alignment of a selected table cell. Item type - 'drop-down'.
- TableStyle - sets additional styling to a selected table inside the Editor. Item type - 'drop-down'.
- BackgroundColor - changes the background color of the current selection. Item type - 'color-input'.
- FontColor - changes the font color of the current selection. Item type = 'color-input'.
- Bold - sets the currently selected text as bold or not. Item type - 'button'.
- Italic - sets the currently selected text as italic. Item type - 'button'.
- Underline - sets the currently selected text as underlined. Itme type - 'button'.
- Strikethrough - set the currently selected text as strikethrough. Item type - 'button'.
- Delete - deletes the current selection. Item type - 'button'.
- Undo - undoes the last operation. Item type - 'button'.
- Redo - redoes the previous operation. Item type - 'button'.
- Indent - indents the current selection once. Item type - 'button'.
- Outdent - outdents the current selection once. Item type - 'button'.
- OpenLink - triggers a hyperlink. Item type - 'button'.
- EditLink - creates/edits the selected hyperlink. Item type - 'button'.
- CreateLink - creates/edits the selected hyperlink. Item type - 'button'.
- RemoveLink - removes the currently selected hyperlink. Item type - 'button'.
- Hyperlink - same as createLink, triggers a Dialog Window for link creation. Item type - 'button'.
- Cut - Cuts the currently selected text. Item type - 'button'.
- Copy - copies the currently selected text. Item type - 'button'
- Paste - pastes the currenly copied/cut text from the Clipboard. Item type = 'button' or 'drop-down' when advanced attribute is set to 'true'.
- Image - triggers a Dialog Window to insert/edit an image. Item type - 'button'.
- Video - triggers a Dialog Window to insert/edit a video. Item type - 'button'.
- LowerCase - changes the current selection to lower case. Item type - 'button'.
- UpperCase - changes the current selection to upper case. Item type - 'button'.
- Print - opens the browser print preview window. Item type - 'button'.
- Caption - insert/remove a caption when a table is selected. Item type - 'button'.
- ClearFormat - removes the formatting of the currntly selected text. Item type - 'button'.
- Table - triggers a Dialog Window to insert a table. Item type - 'button'.
- TableHeader - insert/remove a header row to the currently selected table. Item type - 'button'.
- OrderedList - insert/remove an order list. Item type = 'button'.
- UnorderedList - insert/remove an unordered list. Item type - 'button'.
- Subscript - changes the currently selected text to subscript. Item type - 'button'.
- Superscript - changes the currently selected text to superscript. Item type - 'button'.
- FindAndReplace - opens a dialog that allows to find and replace text inside the Editor's content section. Item type - 'button'.
The inlineToolbarItems attribute is applicable only to the following items: 'table', 'image', 'hyperlink'. It accepts the same type of value as toolbarItems property but the toolbar items will be placed insinde the Inline Toolbar instead. |
ToolbarMode | ToolbarMode | ToolbarMode.Menu | Determines the toolbar mode of the Editor. The main toolbar of the Editor can appear as a Ribbon or as a Menu. |
ToolbarRibbonConfig | IEnumerable<object> | [{"name":"homeTab","groups":[{"name":"undoGroup","items":["undo","redo"]},{"name":"clipboardGroup","items":["cut","copy","paste"]},{"name":"fontGroup","items":["fontName","fontSize","backgroundColor","fontColor","clearFormat","formats","bold","italic","underline","strikethrough","superscript","subscript"]},{"name":"paragraphGroup","items":["orderedList","unorderedList","indent","outdent","alignment"]},{"name":"editingGroup","items":["findAndReplace"]}]},{"name":"insertTab","groups":[{"name":"tableGroup","items":["table"]},{"name":"imageGroup","items":["image"]}{"name":"videoGroup","items":["video"]},{"name":"linkGroup","items":["createLink","removeLink"]}]},{"name":"viewTab","groups":[{"name":"viewsGroup","items":["fullScreen","sourceCode","splitMode"]}]},{"name":"layoutTab","hidden":true,"groups":[{"name":"deleteGroup","items":["delete"]},{"name":"tableGroup","items":["table","tableHeader","tableRows","tableColumns","tableVAlign","tableStyle",""]},{"name":"imageGroup","items":["image","caption"]},{"name":"videoGroup","items":["video","caption"]}]}] | Allows to configure the SingleLineRibbon appearance by changing the order and items of the groups. |
ToolbarViewMode | ToolbarViewMode | ToolbarViewMode.Toggle | Determines the format of the content that will be pasted inside the Editor. |
ToolbarSticky | bool | false | Sticks the Toolbar to the top of the window and stays there while scrolling. |
Unfocusable | bool | false | If is set to true, the element cannot be focused. |
Value | string | "" | Sets or gets the value of the Editor. |
WindowCustomizationFunction | object | N/A | A function that can be used to completly customize the Editor dialog that is used to insert/edit tables/images/videos/hyperlinks. The function accepts two arguments: - target - the target dialog that is about to be opened.
- item - the toolbar item object that trigger the dialog.
|
Name | Type | Arguments | Description |
ClearContent | void | N/A | Clears the content of the Editor. |
ClearState | void | N/A | Clears the local storage from previously stored states of the Editor with the current id. |
CollapseToolbar | void | N/A | Collapse the Toolbar if the <b>toolbarViewMode</b> is set to 'toggle'. |
DisableToolbarItem | void | string itemName | Disables a Toolbar item.Args: string itemName - The name of the toolbar item to disable. |
EnableToolbarItem | void | string itemName | Enables a previously disabled Toolbar item.Args: string itemName - The name of the toolbar item to enable. |
ExecuteCommand | bool | string commandName, object value | Executes a command via the native <b>execCommand</b> method. The method returns true or false depending on whether the execution was successful or not. The following list of commands can be eexecuted: <ul><li>bold - makes the currently selected content bold. Example: <b>editor.executeCommand('bold');</b></li><li>italic - makes the currently selected content italic. Example: <b>editor.executeCommand('italic');</b></li><li>undelined - makes the currently selected content underlined. Example: <b>editor.executeCommand('underline');</b></li><li>strikeThrough - applies a single line strike through formatting to the currently selected content. Example: <b>editor.executeCommand('strikeThrough');</b></li><li>superscript - sets the selected content as superscript. Example: <b>editor.executeCommand('superscript');</b></li><li>subscript - sets the selected content as superscript. Example: <b>editor.executeCommand('subscript');</b></li><li>uppercase - changes the case of the current selection to upper. Example: <b>editor.executeCommand('uppercase');</b></li><li>lowercase - changes the case of the current selection to lower. Example: <b>editor.executeCommand('lowercase');</b></li><li>foreColor - changes the font color of the current content selection. Example: <b>editor.executeCommand('foreColor', '#000000');</b></li><li>fontName - changes the font name for the selected content. Example: <b>editor.executeCommand('fontName', 'Arial');</b></li><li>fontSize - changes the font size of the currently selected content. Example: <b>editor.executeCommand('fontSize', '15px');</b></li><li>hiliteColor - changes the background color of current selection. Example: <b>editor.executeCommand('hiliteColor', '#000000');</b></li><li>justifyCenter - aligns the content to the center. Example: <b>editor.executeCommand('justifyCenter');</b></li><li>justifyFull - aligns the content to be fully justified. Example: <b>editor.executeCommand('justifyFull');</b></li><li>justifyLeft - aligns the content to the left. Example: <b>editor.executeCommand('justifyLeft');</b></li><li>justifyRight - aligns the content to the right. Example: <b>editor.executeCommand('justifyRight');</b></li><li>undo - allows to undo the previous action. Example: <b>editor.executeCommand('undo');</b></li><li>redo - allows to redo the previous actions. Example: <b>editor.executeCommand('redo');</b></li><li>createLink - creates a hyperlink in the content section of the Editor. Example: <b>editor.executeCommand('createLink', { text: 'Links', url: 'http://', title : 'Link' });</b></li><li>indent - indents the content with one level. Example: <b>editor.executeCommand('indent');</b></li><li>outdent - outdents the content with one level. Example: <b>editor.executeCommand('outdent');</b></li><li>insertHTML - insert an HTML content as string at the current cursor location. Example: <b>editor.executeCommand('insertHTML', '<p>Text</p>');</b></li><li>insertOrderedList - inserts a new numbered list item. Example: <b>editor.executeCommand('insertOrderedList');</b></li><li>insertUnorderedList - inserts a new bulleted list item. Example: <b>editor.executeCommand('insertUnorderedList');</b></li><li>removeFormat - removes the formatting styles from currently selected text. Example: <b>editor.executeCommand('removeFormat');</b></li><li>insertText - inserts a text at the current cursor location. Example: <b>editor.executeCommand('insertText', 'Some text to insert');</b></li><li>insertImage - inserts an image at the current cursor location. Example: <b>editor.executeCommand('insertImage', { url: 'https://www.htmlelements.com/demos/images/carousel-medium-2.jpg'});</b></li></ul>Args: string commandName - The name of the command to execute.,string value - The value for the command. Some commands require a value to be passed, others do not. |
ExecuteCommand | bool | string commandName | Executes a command via the native execCommand method. The method returns true or false depending on whether the execution was successful or not. The following list of commands can be eexecuted: - bold - makes the currently selected content bold. Example: editor.executeCommand('bold');
- italic - makes the currently selected content italic. Example: editor.executeCommand('italic');
- undelined - makes the currently selected content underlined. Example: editor.executeCommand('underline');
- strikeThrough - applies a single line strike through formatting to the currently selected content. Example: editor.executeCommand('strikeThrough');
- superscript - sets the selected content as superscript. Example: editor.executeCommand('superscript');
- subscript - sets the selected content as superscript. Example: editor.executeCommand('subscript');
- uppercase - changes the case of the current selection to upper. Example: editor.executeCommand('uppercase');
- lowercase - changes the case of the current selection to lower. Example: editor.executeCommand('lowercase');
- foreColor - changes the font color of the current content selection. Example: editor.executeCommand('foreColor', '#000000');
- fontName - changes the font name for the selected content. Example: editor.executeCommand('fontName', 'Arial');
- fontSize - changes the font size of the currently selected content. Example: editor.executeCommand('fontSize', '15px');
- hiliteColor - changes the background color of current selection. Example: editor.executeCommand('hiliteColor', '#000000');
- justifyCenter - aligns the content to the center. Example: editor.executeCommand('justifyCenter');
- justifyFull - aligns the content to be fully justified. Example: editor.executeCommand('justifyFull');
- justifyLeft - aligns the content to the left. Example: editor.executeCommand('justifyLeft');
- justifyRight - aligns the content to the right. Example: editor.executeCommand('justifyRight');
- undo - allows to undo the previous action. Example: editor.executeCommand('undo');
- redo - allows to redo the previous actions. Example: editor.executeCommand('redo');
- createLink - creates a hyperlink in the content section of the Editor. Example: editor.executeCommand('createLink', { text: 'Links', url: 'http://', title : 'Link' });
- indent - indents the content with one level. Example: editor.executeCommand('indent');
- outdent - outdents the content with one level. Example: editor.executeCommand('outdent');
- insertHTML - insert an HTML content as string at the current cursor location. Example: editor.executeCommand('insertHTML', '
Text '); - insertOrderedList - inserts a new numbered list item. Example: editor.executeCommand('insertOrderedList');
- insertUnorderedList - inserts a new bulleted list item. Example: editor.executeCommand('insertUnorderedList');
- removeFormat - removes the formatting styles from currently selected text. Example: editor.executeCommand('removeFormat');
- insertText - inserts a text at the current cursor location. Example: editor.executeCommand('insertText', 'Some text to insert');
- insertImage - inserts an image at the current cursor location. Example: editor.executeCommand('insertImage', { url: 'https://www.htmlelements.com/demos/images/carousel-medium-2.jpg'});
|
ExecuteCommand | bool | string commandName, string value | Executes a command via the native <b>execCommand</b> method. The method returns true or false depending on whether the execution was successful or not. The following list of commands can be eexecuted: <ul><li>bold - makes the currently selected content bold. Example: <b>editor.executeCommand('bold');</b></li><li>italic - makes the currently selected content italic. Example: <b>editor.executeCommand('italic');</b></li><li>undelined - makes the currently selected content underlined. Example: <b>editor.executeCommand('underline');</b></li><li>strikeThrough - applies a single line strike through formatting to the currently selected content. Example: <b>editor.executeCommand('strikeThrough');</b></li><li>superscript - sets the selected content as superscript. Example: <b>editor.executeCommand('superscript');</b></li><li>subscript - sets the selected content as superscript. Example: <b>editor.executeCommand('subscript');</b></li><li>uppercase - changes the case of the current selection to upper. Example: <b>editor.executeCommand('uppercase');</b></li><li>lowercase - changes the case of the current selection to lower. Example: <b>editor.executeCommand('lowercase');</b></li><li>foreColor - changes the font color of the current content selection. Example: <b>editor.executeCommand('foreColor', '#000000');</b></li><li>fontName - changes the font name for the selected content. Example: <b>editor.executeCommand('fontName', 'Arial');</b></li><li>fontSize - changes the font size of the currently selected content. Example: <b>editor.executeCommand('fontSize', '15px');</b></li><li>hiliteColor - changes the background color of current selection. Example: <b>editor.executeCommand('hiliteColor', '#000000');</b></li><li>justifyCenter - aligns the content to the center. Example: <b>editor.executeCommand('justifyCenter');</b></li><li>justifyFull - aligns the content to be fully justified. Example: <b>editor.executeCommand('justifyFull');</b></li><li>justifyLeft - aligns the content to the left. Example: <b>editor.executeCommand('justifyLeft');</b></li><li>justifyRight - aligns the content to the right. Example: <b>editor.executeCommand('justifyRight');</b></li><li>undo - allows to undo the previous action. Example: <b>editor.executeCommand('undo');</b></li><li>redo - allows to redo the previous actions. Example: <b>editor.executeCommand('redo');</b></li><li>createLink - creates a hyperlink in the content section of the Editor. Example: <b>editor.executeCommand('createLink', { text: 'Links', url: 'http://', title : 'Link' });</b></li><li>indent - indents the content with one level. Example: <b>editor.executeCommand('indent');</b></li><li>outdent - outdents the content with one level. Example: <b>editor.executeCommand('outdent');</b></li><li>insertHTML - insert an HTML content as string at the current cursor location. Example: <b>editor.executeCommand('insertHTML', '<p>Text</p>');</b></li><li>insertOrderedList - inserts a new numbered list item. Example: <b>editor.executeCommand('insertOrderedList');</b></li><li>insertUnorderedList - inserts a new bulleted list item. Example: <b>editor.executeCommand('insertUnorderedList');</b></li><li>removeFormat - removes the formatting styles from currently selected text. Example: <b>editor.executeCommand('removeFormat');</b></li><li>insertText - inserts a text at the current cursor location. Example: <b>editor.executeCommand('insertText', 'Some text to insert');</b></li><li>insertImage - inserts an image at the current cursor location. Example: <b>editor.executeCommand('insertImage', { url: 'https://www.htmlelements.com/demos/images/carousel-medium-2.jpg'});</b></li></ul>Args: string commandName - The name of the command to execute.,string value - The value for the command. Some commands require a value to be passed, others do not. |
ExecuteCommand | bool | string commandName, int value | Executes a command via the native <b>execCommand</b> method. The method returns true or false depending on whether the execution was successful or not. The following list of commands can be eexecuted: <ul><li>bold - makes the currently selected content bold. Example: <b>editor.executeCommand('bold');</b></li><li>italic - makes the currently selected content italic. Example: <b>editor.executeCommand('italic');</b></li><li>undelined - makes the currently selected content underlined. Example: <b>editor.executeCommand('underline');</b></li><li>strikeThrough - applies a single line strike through formatting to the currently selected content. Example: <b>editor.executeCommand('strikeThrough');</b></li><li>superscript - sets the selected content as superscript. Example: <b>editor.executeCommand('superscript');</b></li><li>subscript - sets the selected content as superscript. Example: <b>editor.executeCommand('subscript');</b></li><li>uppercase - changes the case of the current selection to upper. Example: <b>editor.executeCommand('uppercase');</b></li><li>lowercase - changes the case of the current selection to lower. Example: <b>editor.executeCommand('lowercase');</b></li><li>foreColor - changes the font color of the current content selection. Example: <b>editor.executeCommand('foreColor', '#000000');</b></li><li>fontName - changes the font name for the selected content. Example: <b>editor.executeCommand('fontName', 'Arial');</b></li><li>fontSize - changes the font size of the currently selected content. Example: <b>editor.executeCommand('fontSize', '15px');</b></li><li>hiliteColor - changes the background color of current selection. Example: <b>editor.executeCommand('hiliteColor', '#000000');</b></li><li>justifyCenter - aligns the content to the center. Example: <b>editor.executeCommand('justifyCenter');</b></li><li>justifyFull - aligns the content to be fully justified. Example: <b>editor.executeCommand('justifyFull');</b></li><li>justifyLeft - aligns the content to the left. Example: <b>editor.executeCommand('justifyLeft');</b></li><li>justifyRight - aligns the content to the right. Example: <b>editor.executeCommand('justifyRight');</b></li><li>undo - allows to undo the previous action. Example: <b>editor.executeCommand('undo');</b></li><li>redo - allows to redo the previous actions. Example: <b>editor.executeCommand('redo');</b></li><li>createLink - creates a hyperlink in the content section of the Editor. Example: <b>editor.executeCommand('createLink', { text: 'Links', url: 'http://', title : 'Link' });</b></li><li>indent - indents the content with one level. Example: <b>editor.executeCommand('indent');</b></li><li>outdent - outdents the content with one level. Example: <b>editor.executeCommand('outdent');</b></li><li>insertHTML - insert an HTML content as string at the current cursor location. Example: <b>editor.executeCommand('insertHTML', '<p>Text</p>');</b></li><li>insertOrderedList - inserts a new numbered list item. Example: <b>editor.executeCommand('insertOrderedList');</b></li><li>insertUnorderedList - inserts a new bulleted list item. Example: <b>editor.executeCommand('insertUnorderedList');</b></li><li>removeFormat - removes the formatting styles from currently selected text. Example: <b>editor.executeCommand('removeFormat');</b></li><li>insertText - inserts a text at the current cursor location. Example: <b>editor.executeCommand('insertText', 'Some text to insert');</b></li><li>insertImage - inserts an image at the current cursor location. Example: <b>editor.executeCommand('insertImage', { url: 'https://www.htmlelements.com/demos/images/carousel-medium-2.jpg'});</b></li></ul>Args: string commandName - The name of the command to execute.,int value - The value for the command. Some commands require a value to be passed, others do not. |
ExpandToolbar | void | N/A | Expand the Toolbar if the <b>toolbarViewMode</b> is set to 'toggle'. |
ExportData | void | string dataFormat, object callback | Exports the content of the Editor in the desired format. The currently supported formats are: HTML, Markdown and PDF.Args: string dataFormat - The expected file format.,object callback - A callback that is executed before the data is exported. Allows to modify the output. |
ExportData | void | string dataFormat | Exports the content of the Editor in the desired format. The currently supported formats are: HTML, Markdown and PDF. |
FullScreenMode | void | bool value | Sets Editor into Full Screen Mode. If enabled the Editor is positioned above the page content and fills the screen.Args: bool value - Determines whether to enter or leave split mode. By default the argument is not passed and the mode is toggled. |
FullScreenMode | void | N/A | Sets Editor into Full Screen Mode. If enabled the Editor is positioned above the page content and fills the screen. |
GetCharCount | int | N/A | Returns the number of characters inside the Editor's content. |
GetDataSourceAsync() | Task<IEnumerable<object>> | 'N/A' | Gets the "DataSource" property as Task<IEnumerable<object>>. |
GetHTML | string | N/A | Returns the content of the Editor as HTML. When <b>editMode</b> is set to 'markdown' the markdown is parsed and returned as HTML. |
GetSelectionRange | object | N/A | Returns the current selection range. By default the result is an object of type Range, but if the <b>editMode</b> property is set to 'markdown' the returned value is an object indicating the start/end indexes of the current selection. |
GetText | string | N/A | Returns the content of the Editor as text. |
GetValueAsync() | Task<string> | 'N/A' | Gets the "Value" property as Task<string>. |
HideLastMessage | void | N/A | Hides the last shown message. |
HideMessage | void | object item | Hides a specific message or all messages if no argument is provided.Args: object item - Hides a specific message. The argument can be a DOM reference to a specific item, it's index or it's id. If the argument is not provided then all messages will be closed. |
HideMessage | void | N/A | Hides a specific message or all messages if no argument is provided. |
ImportData | void | object source, object settings | Imports the content of a file to the Editor. The currently supported formats are: TXT or HTML.Args: object source - The url to the file or an object that defines settings for the Ajax request like url, timeput, etc. Object format: { url: string, type: string, data: object, timeout: number },object settings - Additional settings for the ajax request. Such as loadError function, contentType, etc. Format: { contentType: string, beforeSend: Function, loadError: Function, beforeLoadComplete: Function } |
ImportData | void | object source | Imports the content of a file to the Editor. The currently supported formats are: TXT or HTML. |
LoadState | void | N/A | Loads the last stored state of the Editor from local storage. Requires an id to be set to the Editor. |
PreviewMode | void | bool value | Sets Editor into SourceCode/Preview Mode. In this mode the HTML view panel is displayed.Args: bool value - Determines whether to enter or leave split mode. By default the argument is not passed and the mode is toggled. |
PreviewMode | void | N/A | Sets Editor into SourceCode/Preview Mode. In this mode the HTML view panel is displayed. |
Print | void | N/A | Opens the Print Preview Panel of the Browser to print Editor's content. |
Refresh | void | 'N/A' | Refreshes the Blazor Component. Performs a layout of the HTML Elements and recalculates the measurements. |
Render | void | 'N/A' | Re-renders the Blazor Component. This method will make a full re-render. |
SaveState | void | N/A | Saves the current state of the Editor to local storage. Requires an id to be set to the Editor. |
SelectAll | void | N/A | Selects the text inside Editor's content. |
SelectRange | void | int startIndex, int endIndex | Selects a range of text inside the Editor. The method will find the nodes containing the text from the start to the end indexes and will select them as ranges. However, currently only FireFox supports multiple range selection. The rest of the browsers will only select the first node. If the editor is in 'html' <b>editMode</b> then the expected text will be selected regardless of the browser because there's only one node inside the editor.Args: int startIndex - The start index to select from.,int endIndex - The end index to select to. |
ShowMessage | object | string message, object settings | Shows a custom message inside the Editor.Args: string message - The text message to be displayed.,object settings - Additional settings that can be applied to the Toast element that handles the messages. This parameter should contain only valid Toast properties and values. |
ShowMessage | object | string message | Shows a custom message inside the Editor. |
SplitMode | void | bool value | Sets Editor into Split Mode. In split mode the HTML/Markdown editor and SourceCode/Preview panels are visible.Args: bool value - Determines whether to enter or leave split mode. By default the argument is not passed and the mode is toggled. |
SplitMode | void | N/A | Sets Editor into Split Mode. In split mode the HTML/Markdown editor and SourceCode/Preview panels are visible. |
StateHasChanged | void | 'N/A' | Refreshes the state and Re-renders the Blazor Component, if necessary. |
UpdateToolbarItem | object | object name, object settings | Allows to update the settings of a single toolbar item. The method returns <b>true</b> if successful.Args: string name - The name of the toolbar item or it's index inside the <b>toolbarItems</b> array.,object settings - A settings object for the toolbar item. It should have the same definition as when defining a custom toolbar item. You can read more about it in the dedicated topic for the Editor Toolbar on the website. |
Name | Type | Description | Event Detail |
OnChange | EventCallback<Event> | This event is triggered on blur if the content is changed. | dynamic oldValue- The old value before the change., dynamic value- The new value after the change. |
Changed | event EditorChangedEventHandler | This event is triggered on blur if the content is changed. | EditorChangedEventArgs |
OnChanging | EventCallback<Event> | This event is triggered after user input to indicate that the content is changed via user interaction. | dynamic oldValue- The old value before the input change., dynamic value- The new value after the input change. |
Changing | event EditorChangingEventHandler | This event is triggered after user input to indicate that the content is changed via user interaction. | EditorChangingEventArgs |
OnActionStart | EventCallback<Event> | This event is triggered before a Toolbar action is started. The event can be canceled via event.preventDefault(). | dynamic name- The name of the action. |
ActionStarted | event EditorActionStartedEventHandler | This event is triggered before a Toolbar action is started. The event can be canceled via event.preventDefault(). | EditorActionStartedEventArgs |
OnActionEnd | EventCallback<Event> | This event is triggered when a Toolbar action has ended. | dynamic name- The name of the action. |
ActionEnded | event EditorActionEndedEventHandler | This event is triggered when a Toolbar action has ended. | EditorActionEndedEventArgs |
OnContextMenuItemClick | EventCallback<Event> | This event is triggered when a Context menu item has been clicked. | dynamic originalEvent- The original click event., dynamic value- The value of the item. |
ContextMenuItemClicked | event EditorContextMenuItemClickedEventHandler | This event is triggered when a Context menu item has been clicked. | EditorContextMenuItemClickedEventArgs |
OnContextMenuOpen | EventCallback<Event> | This event is triggered when the Context Menu is opened. | dynamic target- The toolbar that is the target of the operation., dynamic owner- The tooltip target (the owner of the tooltip). |
ContextMenuOpened | event EditorContextMenuOpenedEventHandler | This event is triggered when the Context Menu is opened. | EditorContextMenuOpenedEventArgs |
OnContextMenuOpening | EventCallback<Event> | This event is triggered when the Context Menu is opening. The opening operation can be canceled via event.preventDefault(). | dynamic target- The toolbar that is the target of the operation. |
ContextMenuOpening | event EditorContextMenuOpeningEventHandler | This event is triggered when the Context Menu is opening. The opening operation can be canceled via event.preventDefault(). | EditorContextMenuOpeningEventArgs |
OnContextMenuClose | EventCallback<Event> | This event is triggered when the Context Menu is closed. | dynamic target- The toolbar that is the target of the operation., dynamic owner- The tooltip target (the owner of the tooltip). |
ContextMenuClosed | event EditorContextMenuClosedEventHandler | This event is triggered when the Context Menu is closed. | EditorContextMenuClosedEventArgs |
OnContextMenuClosing | EventCallback<Event> | This event is triggered when the Context Menu is closing. The closing operation can be canceled via event.preventDefault(). | dynamic target- The toolbar that is the target of the operation. |
ContextMenuClosing | event EditorContextMenuClosingEventHandler | This event is triggered when the Context Menu is closing. The closing operation can be canceled via event.preventDefault(). | EditorContextMenuClosingEventArgs |
OnResizeStart | EventCallback<Event> | This event is triggered when an image/table/video resizing has started. | N/A |
ResizeStarted | event EditorResizeStartedEventHandler | This event is triggered when an image/table/video resizing has started. | EditorResizeStartedEventArgs |
OnResizeEnd | EventCallback<Event> | This event is triggered when an image/table/video resizing has ended. | dynamic target- The element that is resized (image/table or video). |
ResizeEnded | event EditorResizeEndedEventHandler | This event is triggered when an image/table/video resizing has ended. | EditorResizeEndedEventArgs |
OnInlineToolbarOpen | EventCallback<Event> | This event is triggered when the inline Toolbar is opened. | dynamic target- The toolbar that is the target of the operation., dynamic owner- The tooltip target (the owner of the tooltip). |
InlineToolbarOpened | event EditorInlineToolbarOpenedEventHandler | This event is triggered when the inline Toolbar is opened. | EditorInlineToolbarOpenedEventArgs |
OnInlineToolbarOpening | EventCallback<Event> | This event is triggered when the inline Toolbar is opening. The opening operation can be canceled by calling event.preventDefault() in the event handler function. | dynamic target- The toolbar that is the target of the operation. |
InlineToolbarOpening | event EditorInlineToolbarOpeningEventHandler | This event is triggered when the inline Toolbar is opening. The opening operation can be canceled by calling event.preventDefault() in the event handler function. | EditorInlineToolbarOpeningEventArgs |
OnInlineToolbarClose | EventCallback<Event> | This event is triggered when the inline Toolbar is closed. | dynamic target- The toolbar that is the target of the operation., dynamic owner- The tooltip target (the owner of the tooltip). |
InlineToolbarClosed | event EditorInlineToolbarClosedEventHandler | This event is triggered when the inline Toolbar is closed. | EditorInlineToolbarClosedEventArgs |
OnInlineToolbarClosing | EventCallback<Event> | This event is triggered when the inline Toolbar is closing. | dynamic target- The toolbar that is the target of the operation. The closing operation can be canceled by calling event.preventDefault() in the event handler function. |
InlineToolbarClosing | event EditorInlineToolbarClosingEventHandler | This event is triggered when the inline Toolbar is closing. | EditorInlineToolbarClosingEventArgs |
OnDropDownToolbarOpen | EventCallback<Event> | This event is triggered when the Drop Down Toolbar is opened. | dynamic target- The toolbar that is the target of the operation., dynamic owner- The tooltip target (the owner of the tooltip). |
DropDownToolbarOpened | event EditorDropDownToolbarOpenedEventHandler | This event is triggered when the Drop Down Toolbar is opened. | EditorDropDownToolbarOpenedEventArgs |
OnDropDownToolbarOpening | EventCallback<Event> | This event is triggered when the Drop Down Toolbar is opening. The opening operation can be canceled by calling event.preventDefault() in the event handler function. | dynamic target- The toolbar that is the target of the operation. |
DropDownToolbarOpening | event EditorDropDownToolbarOpeningEventHandler | This event is triggered when the Drop Down Toolbar is opening. The opening operation can be canceled by calling event.preventDefault() in the event handler function. | EditorDropDownToolbarOpeningEventArgs |
OnDropDownToolbarClose | EventCallback<Event> | This event is triggered when the Drop Down Toolbar is closed. | dynamic target- The toolbar that is the target of the operation., dynamic owner- The tooltip target (the owner of the tooltip). |
DropDownToolbarClosed | event EditorDropDownToolbarClosedEventHandler | This event is triggered when the Drop Down Toolbar is closed. | EditorDropDownToolbarClosedEventArgs |
OnDropDownToolbarClosing | EventCallback<Event> | This event is triggered when the Drop Down Toolbar is closing. The closing operation can be canceled by calling event.preventDefault() in the event handler function. | dynamic target- The toolbar that is the target of the operation. |
DropDownToolbarClosing | event EditorDropDownToolbarClosingEventHandler | This event is triggered when the Drop Down Toolbar is closing. The closing operation can be canceled by calling event.preventDefault() in the event handler function. | EditorDropDownToolbarClosingEventArgs |
OnDialogOpen | EventCallback<Event> | This event is triggered the Dialog Window is opened. | dynamic target- The window that is the target of the operation., dynamic item- The toolbar item is the target of the operation. |
DialogOpened | event EditorDialogOpenedEventHandler | This event is triggered the Dialog Window is opened. | EditorDialogOpenedEventArgs |
OnDialogOpening | EventCallback<Event> | This event is triggered before the Dialog Window is opened. The event can be prevented via event.preventDefault(). | dynamic target- The window that is the target of the operation., dynamic item- The toolbar item that is the target of the operation. |
DialogOpening | event EditorDialogOpeningEventHandler | This event is triggered before the Dialog Window is opened. The event can be prevented via event.preventDefault(). | EditorDialogOpeningEventArgs |
OnDialogClose | EventCallback<Event> | This event is triggered when the Dialog Window is closed. | dynamic target- The window that is the target of the operation., dynamic item- The toolbar item that is the target of the operation. |
DialogClosed | event EditorDialogClosedEventHandler | This event is triggered when the Dialog Window is closed. | EditorDialogClosedEventArgs |
OnDialogClosing | EventCallback<Event> | This event is triggered before the Dialog Window is closing. The event can be prevented via event.preventDefault(). | dynamic target- The window that is the target of the operation., dynamic item- The toolbar item that is the target of the operation. |
DialogClosing | event EditorDialogClosingEventHandler | This event is triggered before the Dialog Window is closing. The event can be prevented via event.preventDefault(). | EditorDialogClosingEventArgs |
OnImageUploadSuccess | EventCallback<Event> | This event is triggered when the uploading of an image/video is successful. | dynamic target- The file upload element that is the target of the operation., dynamic item- The toolbar item that is the target of the operation., dynamic filename- The name of the uploaded file., dynamic type- The type of the uploaded file., dynamic size- The size of the uploaded file., int index- The index of the uploaded file., dynamic status- The status of the uploaded file. Whether there was an error or success. |
ImageUploadSuccessed | event EditorImageUploadSuccessedEventHandler | This event is triggered when the uploading of an image/video is successful. | EditorImageUploadSuccessedEventArgs |
OnImageUploadFailed | EventCallback<Event> | This event is triggered when the uploading of an image/video is unsuccessful. | dynamic target- The file upload element that is the target of the operation., dynamic item- The toolbar item that is the target of the operation., dynamic filename- The name of the canceled file., dynamic type- The type of the canceled file., dynamic size- The size of the canceled file., int index- The index of the canceled file., dynamic status- The status of the uploaded file. Whether there was an error or success. |
ImageUploadFailed | event EditorImageUploadFailedEventHandler | This event is triggered when the uploading of an image/video is unsuccessful. | EditorImageUploadFailedEventArgs |
OnToobarItemClick | EventCallback<Event> | This event is triggered when a Toolbar item is clicked. | dynamic originalEvent- The original click event., dynamic value- The name of the toolbar item that was clicked. |
ToobarItemClicked | event EditorToobarItemClickedEventHandler | This event is triggered when a Toolbar item is clicked. | EditorToobarItemClickedEventArgs |
OnMessageClose | EventCallback<Event> | This event is triggered when a message is closed. | dynamic instance- The toast item that is the target of the operation. |
MessageClosed | event EditorMessageClosedEventHandler | This event is triggered when a message is closed. | EditorMessageClosedEventArgs |
OnMessageOpen | EventCallback<Event> | This event is triggered when a message is opened. | dynamic instance- The toast item that is the target of the operation. |
MessageOpened | event EditorMessageOpenedEventHandler | This event is triggered when a message is opened. | EditorMessageOpenedEventArgs |