Editor Properties
Name | Type | Default | Description |
---|---|---|---|
Ai | EditorAi | N/A | An object that defines configuration settings for integrating AI capabilities within the grid, including options for enabling AI features, specifying AI service endpoints, adjusting model parameters, and customizing AI-driven functionality in the grid interface. |
AutoFormatting | bool | true | Automatically formats your text in real-time as you type, converting your input into structured elements such as bullet points, checkboxes, headings, and code blocks. This feature streamlines note-taking and writing by instantly applying consistent formatting without requiring manual markup or additional steps. |
AutoLoad | bool | false | Automatically restores the editor's most recently saved state from the browser's local storage when the element is initialized. To retrieve the correct saved state, you must specify a unique id that matches the one used during the saving process. Without this id, the editor cannot identify or load the previously stored state. |
AutoSave | bool | false | Automatically saves the editor's current content at regular intervals specified by the autoSaveInterval property, but only while the editor element is focused. To enable automatic saving, you must assign a unique id to the editor element; this id is used to store and retrieve the editor's saved state. |
AutoSaveInterval | int | 1000 | Specifies the time interval, in milliseconds, at which the Editor automatically saves its state when the autoSave property is enabled. This property controls how frequently the Editor performs auto-save operations. |
CharCountFormatFunction | object | N/A | A customizable formatting function for the character counter display in the Editor. This function receives two parameters: - chars: The current number of characters entered by the user in the Editor. - maxCharCount: The maximum allowed number of characters for the Editor input. The function should return a formatted string that represents the character count status, which will be shown in the Editor’s UI (for example, "25 / 100 characters"). This allows developers to define custom formats for how the character count is displayed to users. |
AutoUpload | bool | false | Controls whether files are automatically uploaded immediately after the user selects them. When enabled, the upload process begins as soon as files are chosen. When disabled, file upload must be triggered manually. This property can be used to either retrieve the current auto-upload setting or update it. |
ContentFiltering | EditorContentFiltering | N/A | Specifies the configuration for content filtering, allowing you to define which types of content are allowed or blocked according to the selected criteria or rules. |
Content_css | string | "" | Defines the CSS file(s) or styles to be applied to the content area within the Editor, allowing you to customize the appearance and formatting of the editor’s content. |
ContextMenu | EditorContextMenu | EditorContextMenu.Default | Specifies the items and structure of the context menu that appears when a user right-clicks within the Editor's content area. This setting allows you to customize which menu options are available based on the user's actions, providing tailored functionality and quick access to relevant commands. |
ContextMenuDataSource | IEnumerable<object> | N/A | Enhances the Editor’s context menu by allowing you to customize its default items. This property accepts several formats: - 'Array of Items:' You can provide an array where each item is either: - A 'string' representing the value/action for the menu item. - An 'object' in the format '{ label: string, value: string }', where: - 'label' is the text displayed in the menu. - 'value' is the action or identifier associated with that menu item. - 'Function:' You can also pass a function that dynamically generates the array of menu items. The function receives the following parameters: - 'target' ('HTMLElement'): The DOM element where the context menu is triggered. - 'type' ('string'): The type or context of the menu (e.g., "table", "image", "link", or other relevant context types). - 'defaultItems' ('string[]'): The default set of menu item identifiers for that context. The function should return an array of menu items (as described above), which will be rendered in place of the default menu. 'Example function signature:' '''javascript function (target: HTMLElement, type: string, defaultItems: string[]) { return defaultItems; } ''' This flexible property enables you to tailor the context menu based on the user's selection, the specific element targeted, or the context of the interaction, helping create a more intuitive and relevant editing experience. |
DataExport | EditorDataExport | N/A | Configures the available options for exporting data from the Editor, such as file formats (CSV, JSON, XML), export settings, and customization preferences. These settings determine how users can save or export content from the Editor. |
Disabled | bool | false | Controls whether the Editor component is active or inactive. When enabled, users can interact with and make changes within the Editor; when disabled, all editing functionalities are restricted or unavailable. |
DisableEditing | bool | false | Prevents users from modifying or editing content within the Editor, making all content read-only. |
DisableSearchBar | bool | false | Prevents the Quick Search Bar from appearing or being accessible to users, effectively disabling its functionality across the application. |
EditMode | EditMode | EditMode.Html | Specifies the editing mode for the Editor component. By default, the Editor operates in standard HTML mode, allowing users to input and edit HTML content directly. In this mode, pressing Enter inserts line breaks or new paragraphs according to standard HTML behavior. When set to 'blockHtml', the Editor creates new DIV elements each time the user presses Enter, promoting a block-based editing experience. This mode also provides built-in commands tailored for structured data entry and manipulation. If set to 'markdown', the Editor functions as a dedicated Markdown editor. User input is interpreted as Markdown syntax, and the Editor automatically parses and converts the Markdown content into HTML for real-time preview. This enables a seamless writing and formatting workflow for users who prefer Markdown. Possible values: - 'html' (default): Accepts and parses HTML input. - 'blockHtml': Uses DIV tags for new blocks and offers additional commands for data input. - 'markdown': Enables Markdown syntax input with live HTML preview. |
EnableHtmlEncode | bool | false | Specifies whether the output from the getHTML method and the Source Code view should be HTML-encoded. When enabled, special characters in the code (such as <, >, and &) are converted to their HTML entity equivalents, ensuring correct display and preventing unintended HTML rendering. When disabled, the values are returned as raw HTML without encoding. |
EnableTabKey | bool | false | Specifies whether pressing the Tab key inside the Editor will insert a tab character at the cursor position, or instead move focus to the next focusable element (default behavior). When enabled, Tab inserts a tab character; when disabled, Tab shifts focus as usual. |
FindAndReplaceTimeout | int | 50 | Specifies the duration (in milliseconds) between consecutive result updates when using the "Find and Replace" and "Search Bar" features. Adjusting this interval can affect how quickly search results are refreshed and displayed to the user during searches. |
HideToolbar | bool | false | Specifies whether the Toolbar is visible or hidden. When set to true, the Toolbar will be hidden; when set to false, the Toolbar will be displayed. |
HideInlineToolbar | bool | false | Specifies whether the Inline Toolbar is visible. If set to true, the toolbar will be hidden; if false, the toolbar will be displayed. |
ImageFormat | EditorImageFormat | EditorImageFormat.Base64 | Specifies the file format for images or videos uploaded from local storage. By default, uploaded files are encoded and stored as base64 strings. This setting allows you to define or change the storage format as needed. |
ImagePasteWidth | int | 0 | Automatically detects and sets the appropriate width for images pasted from the clipboard, ensuring consistent image display and optimal fit within the layout. |
ImagePasteHeight | int | 0 | Automatically detects and sets the appropriate height for an image when it is pasted from the clipboard, ensuring correct aspect ratio and consistent display within the application. |
InnerHTML | string | "en" | Sets the content of the Editor using an HTML string. This method enables you to programmatically insert both plain text and HTML elements, including tags, formatting, and embedded media, directly into the Editor. Existing content will be replaced by the provided HTML. Use this to dynamically update the Editor's contents with custom HTML markup. |
InlineToolbarOffset | int[] | new int[]{} | Specifies the horizontal (x) and vertical (y) offset values used to adjust the position of the Inline Toolbar relative to its default placement on the page. This allows for precise positioning by shifting the toolbar along the x and y axes. |
IframeSettings | EditorIframeSettings | N/A | Specifies the iframe configuration for the Editor. When enabled, the Editor's content is rendered within an isolated iframe, ensuring separation from the main DOM and preventing style or script conflicts. This option enhances content security and encapsulation. Additionally, it provides a mechanism to inject external resources (such as stylesheets or scripts) directly into the iframe environment if required. |
UnlockKey | string | "" | Gets or sets the unlockKey, a unique value required to activate or unlock the product’s features. Use this property to provide the unlock key when authorizing access, or retrieve the current unlock key associated with the product. |
Locale | string | "en" | Specifies the current language code used for localization, such as "en" for English or "fr" for French. This property works together with the messages property to display the appropriate localized messages based on the selected language. Use it to get or set the active language for your application's interface. |
MaxCharCount | int | N/A | Specifies the maximum number of characters that can be entered within the Editor. Once this limit is reached, users will be unable to input additional characters. |
Messages | object | N/A | Defines or retrieves an object containing all user-visible strings (such as labels, tooltips, and messages) used by the widget for display purposes and localization. This property works together with the language setting to enable customization and translation of the widget’s interface into different languages. The object allows developers to provide localized string values, ensuring the widget content is appropriately translated for end users. |
Name | string | "null" | Assigns the specified element to the property †a†, designating it as the form control responsible for submitting the Editor's value. This allows the Editor’s content to be included in form submissions, ensuring its data is sent when the form is submitted. |
PasteFormat | PasteFormat | PasteFormat.KeepFormat | Specifies the format (such as plain text, HTML, or Markdown) in which content will be inserted into the Editor when a user pastes data, ensuring consistent formatting and correct rendering within the editing environment. |
Placeholder | string | "" | Specifies the placeholder text or element displayed within the Editor when it is empty, guiding users on what to enter or indicating the expected content. |
RemoveStylesOnClearFormat | bool | false | Specifies whether activating the clearFormat toolbar action should also remove any inline CSS styles (such as style attributes) applied to the currently selected node. When enabled, this option ensures that in addition to removing formatting tags (like <b> , <i> , etc.), all custom inline styles will be cleared from the selected content. |
Required | bool | false | Specifies whether the Editor's content is required. If this option is enabled and the Editor is left empty, a notification will be displayed indicating that the content cannot be empty and must be provided before proceeding. |
RightToLeft | bool | false | Sets or retrieves a value that specifies whether the element's text direction and alignment are configured for right-to-left (RTL) languages, such as Arabic or Hebrew. This property ensures that the element displays its content in a manner appropriate for RTL locale support. |
Sanitized | bool | false | Indicates whether the value is sanitized to protect against Cross-Site Scripting (XSS) attacks. When enabled, any potentially malicious scripts, inline event handlers, or other XSS vulnerabilities are automatically removed from the HTML content entered in the Editor, ensuring only safe and clean HTML is allowed. |
ShowCharCount | bool | false | Controls the visibility of the character counter. When enabled, the counter appears in the bottom right corner of the input field. If a maxCharCount value is set, the counter changes color to visually warn the user as they approach the character limit: - When the content length reaches 70% or more of the maximum, the counter displays a warning color. - At 90% or more of the maximum, the counter switches to a more prominent warning color, indicating that the limit is nearly reached. - Once the character count reaches the maximum limit, further text input is prevented. |
SpellCheck | bool | true | Specifies if the editor enables spell checking, allowing the identification and highlighting of spelling errors within the text. If set to true, the editor will actively check and mark misspelled words as the user types. If set to false, spell checking functionality will be disabled. |
SplitModeRefreshTimeout | int | 100 | Specifies the time interval, in milliseconds, at which the Source Code and Preview panels are automatically refreshed when Split Mode is active. Adjusting this value controls how frequently the panels update to reflect changes in real-time while Split Mode is enabled. |
Users | IEnumerable<object> | [] | Defines the list of editor users for the application. Expects an array of user objects, each requiring the following properties: - ''id'': A unique identifier for the user (string or number). - ''name'': The display name of the user (string). Each user object may also include the following optional properties: - ''color'': A string specifying the user's color (e.g., HEX or CSS color value) for UI highlighting. - ''image'': A string containing the URL of the user's avatar or profile image. |
EnablePages | bool | false | Activates the editor pages functionality, allowing users to create, edit, and manage custom pages directly within the editor interface. |
Pages | IEnumerable<object> | [] | Defines the editor pages by accepting an array of objects, where each object must include a 'label' property (a string representing the title or name of the page) and an 'innerHTML' property (a string containing the HTML content to be displayed on that page). |
UploadUrl | string | "" | Specifies the URL endpoint used for file uploads. This property directly maps to the 'action' attribute of the upload form, determining where the uploaded data is sent on the server. For example, you can set the 'uploadUrl' property to the path of a server-side script such as a PHP file (e.g., "upload.php") that processes and handles incoming file uploads. Setting this property ensures that files selected by the user are transmitted to the specified server location when the upload form is submitted. |
RemoveUrl | string | "" | Defines or retrieves the URL used for the remove operation. This property corresponds to the form's action attribute and specifies the server endpoint that will handle item removal requests. For example, setting the removeUrl property to the path of a PHP file enables the server-side script to process and execute the removal action when triggered. |
Theme | string | "" | Specifies the theme to be applied to the element. The selected theme controls the overall visual appearance, including colors, fonts, and styles, ensuring a consistent look and feel throughout the element. |
ToolbarItems | IEnumerable<IEditorToolbarItem> | N/A | 'Provides the configuration for the Toolbar items in the editor.' The value can be either an array of strings—where each string specifies the name of a default toolbar item—or an array of objects for more advanced configuration and customization. - 'String Values:' Each string refers to a toolbar item by its name. Names are case-insensitive. - 'Object Values:' An object can define a custom toolbar item, or modify/add settings to an existing one. - The object must include a 'name' property (case-insensitive) to refer to a default toolbar item’s functionality. - If 'name' is set to "custom", you can define a fully custom toolbar item. - If the 'name' attribute is missing or invalid, the entry is treated as a separator rather than a toolbar item. 'Supported Default Toolbar Items' Below is a list of default toolbar items supported by the editor, along with their descriptions and types: - 'SourceCode': Toggles between the HTML source/preview panel and the input panel. *Type: Toggle button* - 'SplitMode': Splits the editor view to show both input and preview panels. *Type: Toggle button* - 'FullScreen': Expands the editor to fill the viewport, overlaying the page content. *Type: Toggle button* - 'Alignment': Controls the alignment (left, center, right, justify) of the selected content. *Type: Dropdown* - 'FontName': Sets the font family of the selected content. *Type: Dropdown* - 'FontSize': Sets the font size of the selected content. *Type: Dropdown* - 'Formats': Changes the format/style of the current selection (e.g., paragraph, heading). *Type: Dropdown* - 'TableRows': Insert or remove table rows in the selected table. *Type: Dropdown* - 'TableColumns': Insert or remove table columns in the selected table. *Type: Dropdown* - 'TableVAlign': Sets vertical alignment of a selected table cell. *Type: Dropdown* - 'TableStyle': Applies additional styling to the selected table. *Type: Dropdown* - 'BackgroundColor': Changes the background color of the current selection. *Type: Color input* - 'FontColor': Changes the font color of the current selection. *Type: Color input* - 'Bold': Toggles bold for the selected text. *Type: Button* - 'Italic': Toggles italic for the selected text. *Type: Button* - 'Underline': Toggles underline for the selected text. *Type: Button* - 'Strikethrough': Toggles strikethrough for the selected text. *Type: Button* - 'Delete': Deletes the current selection. *Type: Button* - 'Undo': Reverts the last operation. *Type: Button* - 'Redo': Redoes the previously undone operation. *Type: Button* - 'Indent': Increases the indentation of the current selection. *Type: Button* - 'Outdent': Decreases the indentation of the current selection. *Type: Button* - 'OpenLink': Opens the hyperlink of the current selection. *Type: Button* - 'EditLink', 'CreateLink', 'Hyperlink': Creates, edits, or triggers a dialog for hyperlink management. *Type: Button* - 'RemoveLink': Removes a hyperlink from the selected text. *Type: Button* - 'Cut': Cuts the selected content. *Type: Button* - 'Copy': Copies the selected content. *Type: Button* - 'Paste': Pastes from the clipboard. - *Type: Button* - *Type: Dropdown* (when the "advanced" property is set to true) - 'Image': Opens a dialog to insert or edit an image. *Type: Button* - 'Video': Opens a dialog to insert or edit a video. *Type: Button* - 'LowerCase': Converts current selection to lowercase letters. *Type: Button* - 'UpperCase': Converts current selection to uppercase letters. *Type: Button* - 'Print': Opens the browser's print preview window. *Type: Button* - 'Caption': Inserts or removes a caption in the selected table. *Type: Button* - 'ClearFormat': Removes all formatting from the current selection. *Type: Button* - 'Table': Opens a dialog to insert a new table. *Type: Button* - 'TableHeader': Adds or removes a header row in the selected table. *Type: Button* - 'OrderedList': Inserts or removes an ordered (numbered) list. *Type: Button* - 'UnorderedList': Inserts or removes a bulleted list. *Type: Button* - 'Subscript': Formats the selected text as subscript. *Type: Button* - 'Superscript': Formats the selected text as superscript. *Type: Button* - 'FindAndReplace': Opens a dialog to find and replace text in the editor. *Type: Button* 'Note:' Separators between toolbar items can be added by using an object without a valid 'name' property. --- 'inlineToolbarItems' - This property is applicable only for the following toolbar items: 'table', 'image', and 'hyperlink'. - Accepts the same value types and structure as 'toolbarItems'. - The specified items will be displayed in an inline floating toolbar when any of these elements is selected in the editor. --- 'Summary of Usage Examples:' '''json [ "Bold", "Italic", { "name": "FontSize", "options": ["Small", "Medium", "Large"] }, {}, { "name": "custom", "label": "Custom Action", "icon": "..." } ] ''' - The above would provide bold and italic buttons, a dropdown with custom font size options, a separator, and a custom toolbar item. --- This configuration enables full customization of the editor’s toolbar to suit different user requirements, offering both default and extendable options. |
ToolbarMode | ToolbarMode | ToolbarMode.Menu | Specifies the display style of the Editor’s main toolbar. You can choose between "Ribbon" mode, which presents the toolbar as a horizontal panel with grouped command icons similar to modern office applications, or "Menu" mode, which organizes commands in drop-down menus for a more compact, traditional interface. This setting controls how users interact with the Editor’s primary tools and functions. |
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"]}]}] | Enables customization of the SingleLineRibbon's appearance by allowing you to modify the arrangement and selection of group items, as well as reorder the groups themselves. This provides flexibility in tailoring the ribbon layout to better suit your application's specific needs. |
ToolbarViewMode | ToolbarViewMode | ToolbarViewMode.Toggle | Specifies the format (such as plain text, HTML, or Markdown) that will be applied to content when it is pasted into the Editor. This setting controls how the pasted data is interpreted and ensures that it is correctly displayed within the Editor environment. |
ToolbarSticky | bool | false | Fixes the Toolbar to the top of the browser window, ensuring it remains visible at all times, even as the user scrolls through the page content. |
Unfocusable | bool | false | If set to true, this property prevents the element from receiving keyboard or programmatic focus, making it impossible for users to interact with it using the keyboard or assistive technologies. |
Value | string | "" | Provides methods to retrieve or update the current content within the Editor. Use this property to access the existing value or assign a new value to the Editor programmatically. |
WindowCustomizationFunction | object | N/A | A customizable function that allows you to fully modify the appearance and behavior of the Editor dialog used for inserting or editing tables, images, videos, and hyperlinks. The function receives two arguments: - 'target': The dialog element instance that is about to be displayed, representing the specific editor dialog (e.g., Table, Image, Video, or Hyperlink dialog) being opened. - 'item': The toolbar item object that triggered the opening of the dialog, allowing you to access information about the source of the dialog request or customize its settings based on the initiating toolbar action. Use this function to tailor the dialog's UI elements, default values, event handlers, or any other properties, providing a flexible way to match the dialog experience to your application's needs. |
Editor Methods
Name | Type | Arguments | Description |
---|---|---|---|
AddToolbarItem | void | object itemName | Integrates a custom item into the editor’s toolbar. <br/><br/>**Example Usage:**<br/>```js<br/>editor.addToolbarItem({<br/> name: 'customButton2', // Unique identifier for the toolbar item<br/> width: 100, // Width of the toolbar item in pixels<br/> template: '<smart-button>Button2</smart-button>' // Custom HTML template defining the toolbar item's appearance and content<br/>});<br/>```<br/><br/>**Description:** <br/>This method allows you to add a new, customizable button or element to the editor’s toolbar. You specify a unique name, the width, and provide an HTML template for the item’s content. This enables the creation of tailored toolbar controls to enhance your editor’s functionality according to your application’s needs.Args: object itemName - The toolbar item to be added |
ClearContent | void | N/A | Removes all text and formatting from the Editor, resetting its content to an empty state. |
ClearState | void | N/A | Removes all previously saved states associated with the current Editor's ID from the local storage. This ensures that any stored data related to this specific Editor instance is deleted, allowing for a fresh start or preventing data conflicts. |
CollapseToolbar | void | N/A | Collapse the toolbar when the <b>toolbarViewMode</b> property is set to <code>'toggle'</code>. This ensures that the toolbar is hidden or shown based on the toggle state, allowing for a dynamic and responsive user interface. |
DisableToolbarItem | void | string itemName | Prevents user interaction with the specified Toolbar item, making it inactive and visually indicating that it is disabled. The item remains visible but cannot be clicked or selected until re-enabled.Args: string itemName - The name of the toolbar item to disable. |
EnableToolbarItem | void | string itemName | Restores the functionality of a Toolbar item that was previously disabled, allowing users to click or interact with it again. This action visually updates the item to indicate it is active and accessible within the Toolbar interface.Args: string itemName - The name of the toolbar item to enable. |
ExecuteCommand | bool | string commandName, object value | Enhances the clarity, consistency, and completeness of the description:<br/><br/>---<br/><br/>Executes a command using the native <b>execCommand</b> method to modify the contents or formatting of the editor. This method returns <b>true</b> if the command executes successfully or <b>false</b> otherwise. You can use this function to apply a wide range of editing and formatting commands to the currently selected content, or at the current cursor position.<br/><br/>Supported commands include:<br/><br/><ul><br/> <li><br/> <b>bold</b>: Toggles bold formatting on the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('bold');</code><br/> </li><br/> <li><br/> <b>italic</b>: Toggles italic formatting on the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('italic');</code><br/> </li><br/> <li><br/> <b>underline</b>: Toggles underline formatting on the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('underline');</code><br/> </li><br/> <li><br/> <b>strikeThrough</b>: Toggles strikethrough formatting on the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('strikeThrough');</code><br/> </li><br/> <li><br/> <b>superscript</b>: Sets the selected text as superscript.<br><br/> <b>Example:</b> <code>editor.executeCommand('superscript');</code><br/> </li><br/> <li><br/> <b>subscript</b>: Sets the selected text as subscript.<br><br/> <b>Example:</b> <code>editor.executeCommand('subscript');</code><br/> </li><br/> <li><br/> <b>uppercase</b>: Converts the selected text to uppercase.<br><br/> <b>Example:</b> <code>editor.executeCommand('uppercase');</code><br/> </li><br/> <li><br/> <b>lowercase</b>: Converts the selected text to lowercase.<br><br/> <b>Example:</b> <code>editor.executeCommand('lowercase');</code><br/> </li><br/> <li><br/> <b>foreColor</b>: Changes the font color of the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('foreColor', '#000000');</code><br/> </li><br/> <li><br/> <b>fontName</b>: Changes the font family of the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('fontName', 'Arial');</code><br/> </li><br/> <li><br/> <b>fontSize</b>: Changes the font size of the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('fontSize', '15px');</code><br/> </li><br/> <li><br/> <b>hiliteColor</b>: Changes the background color (highlight) of the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('hiliteColor', '#FFFF00');</code><br/> </li><br/> <li><br/> <b>justifyCenter</b>: Aligns the selected content to the center.<br><br/> <b>Example:</b> <code>editor.executeCommand('justifyCenter');</code><br/> </li><br/> <li><br/> <b>justifyFull</b>: Justifies the selected content.<br><br/> <b>Example:</b> <code>editor.executeCommand('justifyFull');</code><br/> </li><br/> <li><br/> <b>justifyLeft</b>: Aligns the selected content to the left.<br><br/> <b>Example:</b> <code>editor.executeCommand('justifyLeft');</code><br/> </li><br/> <li><br/> <b>justifyRight</b>: Aligns the selected content to the right.<br><br/> <b>Example:</b> <code>editor.executeCommand('justifyRight');</code><br/> </li><br/> <li><br/> <b>undo</b>: Undoes the last editing operation.<br><br/> <b>Example:</b> <code>editor.executeCommand('undo');</code><br/> </li><br/> <li><br/> <b>redo</b>: Redoes the previously undone operation.<br><br/> <b>Example:</b> <code>editor.executeCommand('redo');</code><br/> </li><br/> <li><br/> <b>createLink</b>: Inserts a hyperlink at the current selection. Accepts an object with <code>text</code>, <code>url</code>, and <code>title</code> properties.<br><br/> <b>Example:</b> <code>editor.executeCommand('createLink', { text: 'Link', url: 'https://example.com', title: 'Example Link' });</code><br/> </li><br/> <li><br/> <b>indent</b>: Increases the indent level of the selected content.<br><br/> <b>Example:</b> <code>editor.executeCommand('indent');</code><br/> </li><br/> <li><br/> <b>outdent</b>: Decreases the indent level of the selected content.<br><br/> <b>Example:</b> <code>editor.executeCommand('outdent');</code><br/> </li><br/> <li><br/> <b>insertHTML</b>: Inserts an HTML string at the current cursor position.<br><br/> <b>Example:</b> <code>editor.executeCommand('insertHTML', '<p>Text</p>');</code><br/> </li><br/> <li><br/> <b>insertOrderedList</b>: Inserts an ordered (numbered) list.<br><br/> <b>Example:</b> <code>editor.executeCommand('insertOrderedList');</code><br/> </li><br/> <li><br/> <b>insertUnorderedList</b>: Inserts an unordered (bulleted) list.<br><br/> <b>Example:</b> <code>editor.executeCommand('insertUnorderedList');</code><br/> </li><br/> <li><br/> <b>removeFormat</b>: Removes all formatting from the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('removeFormat');</code><br/> </li><br/> <li><br/> <b>insertText</b>: Inserts plain text at the current cursor position.<br><br/> <b>Example:</b> <code>editor.executeCommand('insertText', 'Some text to insert');</code><br/> </li><br/> <li><br/> <b>insertImage</b>: Inserts an image at the current cursor position. Accepts an object with a <code>url</code> property.<br><br/> <b>Example:</b> <code>editor.executeCommand('insertImage', { url: 'https://www.example.com/image.jpg' });</code><br/> </li><br/></ul><br/><br/><b>Note:</b> Some commands may not be fully supported in all browsers due to the deprecated status of <code>execCommand</code>. Always test your implementation for compatibility with your target browsers.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 | Enhances the clarity, consistency, and completeness of the description: --- Executes a command using the native execCommand method to modify the contents or formatting of the editor. This method returns true if the command executes successfully or false otherwise. You can use this function to apply a wide range of editing and formatting commands to the currently selected content, or at the current cursor position. Supported commands include:
Note: Some commands may not be fully supported in all browsers due to the deprecated status of execCommand . Always test your implementation for compatibility with your target browsers. |
ExecuteCommand | bool | string commandName, string value | Enhances the clarity, consistency, and completeness of the description:<br/><br/>---<br/><br/>Executes a command using the native <b>execCommand</b> method to modify the contents or formatting of the editor. This method returns <b>true</b> if the command executes successfully or <b>false</b> otherwise. You can use this function to apply a wide range of editing and formatting commands to the currently selected content, or at the current cursor position.<br/><br/>Supported commands include:<br/><br/><ul><br/> <li><br/> <b>bold</b>: Toggles bold formatting on the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('bold');</code><br/> </li><br/> <li><br/> <b>italic</b>: Toggles italic formatting on the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('italic');</code><br/> </li><br/> <li><br/> <b>underline</b>: Toggles underline formatting on the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('underline');</code><br/> </li><br/> <li><br/> <b>strikeThrough</b>: Toggles strikethrough formatting on the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('strikeThrough');</code><br/> </li><br/> <li><br/> <b>superscript</b>: Sets the selected text as superscript.<br><br/> <b>Example:</b> <code>editor.executeCommand('superscript');</code><br/> </li><br/> <li><br/> <b>subscript</b>: Sets the selected text as subscript.<br><br/> <b>Example:</b> <code>editor.executeCommand('subscript');</code><br/> </li><br/> <li><br/> <b>uppercase</b>: Converts the selected text to uppercase.<br><br/> <b>Example:</b> <code>editor.executeCommand('uppercase');</code><br/> </li><br/> <li><br/> <b>lowercase</b>: Converts the selected text to lowercase.<br><br/> <b>Example:</b> <code>editor.executeCommand('lowercase');</code><br/> </li><br/> <li><br/> <b>foreColor</b>: Changes the font color of the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('foreColor', '#000000');</code><br/> </li><br/> <li><br/> <b>fontName</b>: Changes the font family of the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('fontName', 'Arial');</code><br/> </li><br/> <li><br/> <b>fontSize</b>: Changes the font size of the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('fontSize', '15px');</code><br/> </li><br/> <li><br/> <b>hiliteColor</b>: Changes the background color (highlight) of the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('hiliteColor', '#FFFF00');</code><br/> </li><br/> <li><br/> <b>justifyCenter</b>: Aligns the selected content to the center.<br><br/> <b>Example:</b> <code>editor.executeCommand('justifyCenter');</code><br/> </li><br/> <li><br/> <b>justifyFull</b>: Justifies the selected content.<br><br/> <b>Example:</b> <code>editor.executeCommand('justifyFull');</code><br/> </li><br/> <li><br/> <b>justifyLeft</b>: Aligns the selected content to the left.<br><br/> <b>Example:</b> <code>editor.executeCommand('justifyLeft');</code><br/> </li><br/> <li><br/> <b>justifyRight</b>: Aligns the selected content to the right.<br><br/> <b>Example:</b> <code>editor.executeCommand('justifyRight');</code><br/> </li><br/> <li><br/> <b>undo</b>: Undoes the last editing operation.<br><br/> <b>Example:</b> <code>editor.executeCommand('undo');</code><br/> </li><br/> <li><br/> <b>redo</b>: Redoes the previously undone operation.<br><br/> <b>Example:</b> <code>editor.executeCommand('redo');</code><br/> </li><br/> <li><br/> <b>createLink</b>: Inserts a hyperlink at the current selection. Accepts an object with <code>text</code>, <code>url</code>, and <code>title</code> properties.<br><br/> <b>Example:</b> <code>editor.executeCommand('createLink', { text: 'Link', url: 'https://example.com', title: 'Example Link' });</code><br/> </li><br/> <li><br/> <b>indent</b>: Increases the indent level of the selected content.<br><br/> <b>Example:</b> <code>editor.executeCommand('indent');</code><br/> </li><br/> <li><br/> <b>outdent</b>: Decreases the indent level of the selected content.<br><br/> <b>Example:</b> <code>editor.executeCommand('outdent');</code><br/> </li><br/> <li><br/> <b>insertHTML</b>: Inserts an HTML string at the current cursor position.<br><br/> <b>Example:</b> <code>editor.executeCommand('insertHTML', '<p>Text</p>');</code><br/> </li><br/> <li><br/> <b>insertOrderedList</b>: Inserts an ordered (numbered) list.<br><br/> <b>Example:</b> <code>editor.executeCommand('insertOrderedList');</code><br/> </li><br/> <li><br/> <b>insertUnorderedList</b>: Inserts an unordered (bulleted) list.<br><br/> <b>Example:</b> <code>editor.executeCommand('insertUnorderedList');</code><br/> </li><br/> <li><br/> <b>removeFormat</b>: Removes all formatting from the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('removeFormat');</code><br/> </li><br/> <li><br/> <b>insertText</b>: Inserts plain text at the current cursor position.<br><br/> <b>Example:</b> <code>editor.executeCommand('insertText', 'Some text to insert');</code><br/> </li><br/> <li><br/> <b>insertImage</b>: Inserts an image at the current cursor position. Accepts an object with a <code>url</code> property.<br><br/> <b>Example:</b> <code>editor.executeCommand('insertImage', { url: 'https://www.example.com/image.jpg' });</code><br/> </li><br/></ul><br/><br/><b>Note:</b> Some commands may not be fully supported in all browsers due to the deprecated status of <code>execCommand</code>. Always test your implementation for compatibility with your target browsers.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 | Enhances the clarity, consistency, and completeness of the description:<br/><br/>---<br/><br/>Executes a command using the native <b>execCommand</b> method to modify the contents or formatting of the editor. This method returns <b>true</b> if the command executes successfully or <b>false</b> otherwise. You can use this function to apply a wide range of editing and formatting commands to the currently selected content, or at the current cursor position.<br/><br/>Supported commands include:<br/><br/><ul><br/> <li><br/> <b>bold</b>: Toggles bold formatting on the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('bold');</code><br/> </li><br/> <li><br/> <b>italic</b>: Toggles italic formatting on the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('italic');</code><br/> </li><br/> <li><br/> <b>underline</b>: Toggles underline formatting on the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('underline');</code><br/> </li><br/> <li><br/> <b>strikeThrough</b>: Toggles strikethrough formatting on the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('strikeThrough');</code><br/> </li><br/> <li><br/> <b>superscript</b>: Sets the selected text as superscript.<br><br/> <b>Example:</b> <code>editor.executeCommand('superscript');</code><br/> </li><br/> <li><br/> <b>subscript</b>: Sets the selected text as subscript.<br><br/> <b>Example:</b> <code>editor.executeCommand('subscript');</code><br/> </li><br/> <li><br/> <b>uppercase</b>: Converts the selected text to uppercase.<br><br/> <b>Example:</b> <code>editor.executeCommand('uppercase');</code><br/> </li><br/> <li><br/> <b>lowercase</b>: Converts the selected text to lowercase.<br><br/> <b>Example:</b> <code>editor.executeCommand('lowercase');</code><br/> </li><br/> <li><br/> <b>foreColor</b>: Changes the font color of the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('foreColor', '#000000');</code><br/> </li><br/> <li><br/> <b>fontName</b>: Changes the font family of the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('fontName', 'Arial');</code><br/> </li><br/> <li><br/> <b>fontSize</b>: Changes the font size of the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('fontSize', '15px');</code><br/> </li><br/> <li><br/> <b>hiliteColor</b>: Changes the background color (highlight) of the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('hiliteColor', '#FFFF00');</code><br/> </li><br/> <li><br/> <b>justifyCenter</b>: Aligns the selected content to the center.<br><br/> <b>Example:</b> <code>editor.executeCommand('justifyCenter');</code><br/> </li><br/> <li><br/> <b>justifyFull</b>: Justifies the selected content.<br><br/> <b>Example:</b> <code>editor.executeCommand('justifyFull');</code><br/> </li><br/> <li><br/> <b>justifyLeft</b>: Aligns the selected content to the left.<br><br/> <b>Example:</b> <code>editor.executeCommand('justifyLeft');</code><br/> </li><br/> <li><br/> <b>justifyRight</b>: Aligns the selected content to the right.<br><br/> <b>Example:</b> <code>editor.executeCommand('justifyRight');</code><br/> </li><br/> <li><br/> <b>undo</b>: Undoes the last editing operation.<br><br/> <b>Example:</b> <code>editor.executeCommand('undo');</code><br/> </li><br/> <li><br/> <b>redo</b>: Redoes the previously undone operation.<br><br/> <b>Example:</b> <code>editor.executeCommand('redo');</code><br/> </li><br/> <li><br/> <b>createLink</b>: Inserts a hyperlink at the current selection. Accepts an object with <code>text</code>, <code>url</code>, and <code>title</code> properties.<br><br/> <b>Example:</b> <code>editor.executeCommand('createLink', { text: 'Link', url: 'https://example.com', title: 'Example Link' });</code><br/> </li><br/> <li><br/> <b>indent</b>: Increases the indent level of the selected content.<br><br/> <b>Example:</b> <code>editor.executeCommand('indent');</code><br/> </li><br/> <li><br/> <b>outdent</b>: Decreases the indent level of the selected content.<br><br/> <b>Example:</b> <code>editor.executeCommand('outdent');</code><br/> </li><br/> <li><br/> <b>insertHTML</b>: Inserts an HTML string at the current cursor position.<br><br/> <b>Example:</b> <code>editor.executeCommand('insertHTML', '<p>Text</p>');</code><br/> </li><br/> <li><br/> <b>insertOrderedList</b>: Inserts an ordered (numbered) list.<br><br/> <b>Example:</b> <code>editor.executeCommand('insertOrderedList');</code><br/> </li><br/> <li><br/> <b>insertUnorderedList</b>: Inserts an unordered (bulleted) list.<br><br/> <b>Example:</b> <code>editor.executeCommand('insertUnorderedList');</code><br/> </li><br/> <li><br/> <b>removeFormat</b>: Removes all formatting from the selected text.<br><br/> <b>Example:</b> <code>editor.executeCommand('removeFormat');</code><br/> </li><br/> <li><br/> <b>insertText</b>: Inserts plain text at the current cursor position.<br><br/> <b>Example:</b> <code>editor.executeCommand('insertText', 'Some text to insert');</code><br/> </li><br/> <li><br/> <b>insertImage</b>: Inserts an image at the current cursor position. Accepts an object with a <code>url</code> property.<br><br/> <b>Example:</b> <code>editor.executeCommand('insertImage', { url: 'https://www.example.com/image.jpg' });</code><br/> </li><br/></ul><br/><br/><b>Note:</b> Some commands may not be fully supported in all browsers due to the deprecated status of <code>execCommand</code>. Always test your implementation for compatibility with your target browsers.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 | Expands the Toolbar only when the <b>toolbarViewMode</b> property is set to <code>'toggle'</code>. When this mode is active, the Toolbar will automatically display its full set of options and controls as specified. If <b>toolbarViewMode</b> is set to another value, this expansion behavior will not occur. |
ExportData | void | string dataFormat, object callback | Exports the content of the Editor in your chosen format. Currently supported export formats include HTML, Markdown, and PDF. This allows you to save or share your work in the format that best suits your needs.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 your chosen format. Currently supported export formats include HTML, Markdown, and PDF. This allows you to save or share your work in the format that best suits your needs. |
FullScreenMode | void | bool value | Enables Full Screen Mode for the Editor. When activated, the Editor expands to cover the entire viewport, overlaying all other page content and providing a distraction-free editing environment.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 | Enables Full Screen Mode for the Editor. When activated, the Editor expands to cover the entire viewport, overlaying all other page content and providing a distraction-free editing environment. |
GetCharCount | int | N/A | Returns the total number of characters currently present within the Editor's content, including spaces and special characters. |
GetDataSourceAsync() | Task<IEnumerable<object>> | 'N/A' | Gets the "DataSource" property as Task<IEnumerable<object>>. |
GetHTML | string | N/A | Returns the current content of the Editor as an HTML string. If <b>editMode</b> is set to 'markdown', the raw Markdown input is automatically parsed and converted to HTML before being returned. In all modes, the result is a well-formed HTML representation of the Editor's content, suitable for rendering in web pages or for further processing. |
GetSelectionRange | object | N/A | Returns the current selection range within the editor. By default, this method returns an object of type Range, which represents the start and end positions of the selection as DOM nodes and offsets. However, if the <b>editMode</b> property is set to 'markdown', the method instead returns a plain object containing the numerical start and end indexes of the selection within the raw text content. This allows for consistent selection handling in both WYSIWYG and markdown editing modes. |
GetText | string | N/A | Returns the current contents of the Editor component as a plain text string, excluding any formatting or markup. This allows you to retrieve only the raw textual data entered by the user. |
GetValueAsync() | Task<string> | 'N/A' | Gets the "Value" property as Task<string>. |
HideLastMessage | void | N/A | Conceals or removes the most recently displayed message from view on the user interface, ensuring it is no longer visible to the user. |
HideMessage | void | object item | Conceals a specified message when an identifier is provided; if no identifier is given, all messages will be hidden.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 | Conceals a specified message when an identifier is provided; if no identifier is given, all messages will be hidden. |
ImportData | void | object source, object settings | Allows users to import the contents of a file directly into the Editor. Currently, only plain text (.txt) and HTML (.html) file formats are supported. Upon import, the file’s contents will be automatically loaded and displayed within the Editor for further editing or review.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 | Allows users to import the contents of a file directly into the Editor. Currently, only plain text (.txt) and HTML (.html) file formats are supported. Upon import, the file’s contents will be automatically loaded and displayed within the Editor for further editing or review. |
InsertToolbarItem | void | object itemName, int index | Inserts a new custom Toolbar item into the editor. <br/>For example, you can add a button with the following code:<br/>```javascript<br/>editor.insertToolbarItem({<br/> name: 'customButton2', // Unique identifier for the toolbar item<br/> width: 100, // Specifies the width of the toolbar item in pixels<br/> template: '<smart-button>Button2</smart-button>' // The HTML template that defines the toolbar item's appearance and functionality<br/>});<br/>```<br/>This method allows you to extend the editor’s toolbar by specifying a unique name for the item, its display width, and a custom HTML template, such as a button or other UI component. This makes it easy to add interactive or specialized controls directly to your editor's toolbar.Args: object itemName - The toolbar item to be added,int index - The toolbar item's index |
LoadState | void | N/A | Restores the most recently saved state of the Editor from the browser’s local storage. To identify and retrieve the correct data, an id property must be assigned to the Editor instance. If no saved state exists for the specified id, the Editor will load with its default settings. |
PreviewMode | void | bool value | Switches the Editor between Source Code and Preview modes. When activated, this mode displays the HTML view panel, allowing users to directly edit or review the underlying HTML code.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 | Switches the Editor between Source Code and Preview modes. When activated, this mode displays the HTML view panel, allowing users to directly edit or review the underlying HTML code. |
void | N/A | Opens the browser’s Print Preview dialog, allowing users to view and print the current content displayed within the Editor. This feature provides a formatted preview of the Editor's contents as they will appear on the printed page before finalizing the print command. | |
Refresh | void | 'N/A' | Refreshes the Blazor Component. Performs a layout of the HTML Elements and recalculates the measurements. |
RemoveToolbarItem | void | int index | Removes a specified item from the Toolbar by its index. <br/>For example, editor.removeToolbarItem(0) will remove the first item in the Toolbar. <br/>Use this method to dynamically update the Toolbar based on user interaction or application state.Args: int index - The toolbar item's index |
Render | void | 'N/A' | Re-renders the Blazor Component. This method will make a full re-render. |
SaveState | void | N/A | Persists the Editor’s current state to the browser’s local storage, allowing users to restore their work in future sessions. Note: An id property must be assigned to the Editor instance to uniquely identify and manage its saved data. |
SelectAll | void | N/A | Highlights and selects all text currently displayed within the Editor's content area, allowing users to easily copy, cut, or replace the selected text. |
SelectRange | void | int startIndex, int endIndex | Enhancement:<br/><br/>"Selects a specified range of text within the Editor based on provided start and end indexes. This method locates the DOM nodes containing the targeted text and creates selection ranges accordingly. Note that only Firefox currently supports selecting multiple, non-contiguous ranges; in other browsers, only the first corresponding node or range will be selected. If the editor is operating in 'html' <b>editMode</b>, the entire content is treated as a single node. As a result, the desired text range will be reliably selected across all browsers in this mode."Args: int startIndex - The start index to select from.,int endIndex - The end index to select to. |
SetLocale | void | string locale, object messages | Sets the locale of a component.Args: string locale - The locale abbreviation. For example: 'de'.,object messages - Object containing the locale messages. |
SetLocale | void | string locale | Sets the locale of a component. |
ShowMessage | object | string message, object settings | Displays a customizable message within the Editor interface, allowing users to present important information, instructions, or notifications directly inside the editing environment.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 | Displays a customizable message within the Editor interface, allowing users to present important information, instructions, or notifications directly inside the editing environment. |
SplitMode | void | bool value | Enables Split Mode in the Editor. When Split Mode is active, both the HTML/Markdown editing panel and the Source Code/Preview panel are displayed side by side, allowing users to simultaneously view and edit the content along with its rendered output or source code. This mode enhances workflow by providing real-time feedback and easier navigation between editing and previewing.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 | Enables Split Mode in the Editor. When Split Mode is active, both the HTML/Markdown editing panel and the Source Code/Preview panel are displayed side by side, allowing users to simultaneously view and edit the content along with its rendered output or source code. This mode enhances workflow by providing real-time feedback and easier navigation between editing and previewing. |
StateHasChanged | void | 'N/A' | Refreshes the state and Re-renders the Blazor Component, if necessary. |
UpdateToolbarItem | object | object name, object settings | Enables the modification of settings for a specified toolbar item. This method returns <b>true</b> if the update is applied successfully, indicating the toolbar item's settings were changed as requested. If the update fails, the method returns <b>false</b>.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. |
Editor Events
Name | Type | Description | Event Detail |
---|---|---|---|
OnChange | EventCallback<Event> | This event is triggered when an element loses focus (blur event) and its content has been modified since it last received focus. | dynamic oldValue- The old value before the change., dynamic value- The new value after the change. |
Changed | event EditorChangedEventHandler | This event is triggered when an element loses focus (blur event) and its content has been modified since it last received focus. | EditorChangedEventArgs |
OnChanging | EventCallback<Event> | This event is triggered immediately after the user modifies the content through direct input, such as typing, pasting, or deleting text. It serves as a notification that the content has changed specifically due to user interaction, allowing you to respond to updates made by the user in real time. | 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 immediately after the user modifies the content through direct input, such as typing, pasting, or deleting text. It serves as a notification that the content has changed specifically due to user interaction, allowing you to respond to updates made by the user in real time. | EditorChangingEventArgs |
OnActionStart | EventCallback<Event> | This event is fired immediately before a Toolbar action begins execution, allowing developers to intervene or modify behavior as needed. By invoking event.preventDefault() within the event handler, you can cancel the pending Toolbar action, preventing it from proceeding. This provides an opportunity to implement custom validation, confirmation prompts, or other pre-action logic before the Toolbar action is carried out. | dynamic name- The name of the action. |
ActionStarted | event EditorActionStartedEventHandler | This event is fired immediately before a Toolbar action begins execution, allowing developers to intervene or modify behavior as needed. By invoking event.preventDefault() within the event handler, you can cancel the pending Toolbar action, preventing it from proceeding. This provides an opportunity to implement custom validation, confirmation prompts, or other pre-action logic before the Toolbar action is carried out. | EditorActionStartedEventArgs |
OnActionEnd | EventCallback<Event> | This event is triggered after a Toolbar action has been completed. It signifies that all processes related to the action, such as updating the UI or executing related logic, have finished. Use this event to perform any follow-up tasks when a Toolbar action concludes. | dynamic name- The name of the action. |
ActionEnded | event EditorActionEndedEventHandler | This event is triggered after a Toolbar action has been completed. It signifies that all processes related to the action, such as updating the UI or executing related logic, have finished. Use this event to perform any follow-up tasks when a Toolbar action concludes. | EditorActionEndedEventArgs |
OnContextMenuItemClick | EventCallback<Event> | This event is triggered when a user selects and clicks on an item within the context menu. It allows you to execute custom logic in response to specific context menu actions, providing access to details about which menu item was clicked and the relevant context of the interaction. | dynamic originalEvent- The original click event., dynamic value- The value of the item. |
ContextMenuItemClicked | event EditorContextMenuItemClickedEventHandler | This event is triggered when a user selects and clicks on an item within the context menu. It allows you to execute custom logic in response to specific context menu actions, providing access to details about which menu item was clicked and the relevant context of the interaction. | EditorContextMenuItemClickedEventArgs |
OnContextMenuOpen | EventCallback<Event> | This event is triggered whenever the user opens the context menu, typically by right-clicking or using a designated keyboard shortcut on an element. It allows developers to execute custom logic or modify the context menu's content before it is displayed to the user. | 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 whenever the user opens the context menu, typically by right-clicking or using a designated keyboard shortcut on an element. It allows developers to execute custom logic or modify the context menu's content before it is displayed to the user. | EditorContextMenuOpenedEventArgs |
OnContextMenuOpening | EventCallback<Event> | This event is triggered immediately before the context menu appears, typically as a result of a user right-clicking or performing a similar gesture. At this point, you have the opportunity to customize or modify the context menu, or to prevent the menu from opening entirely by calling event.preventDefault() within the event handler. | dynamic target- The toolbar that is the target of the operation. |
ContextMenuOpening | event EditorContextMenuOpeningEventHandler | This event is triggered immediately before the context menu appears, typically as a result of a user right-clicking or performing a similar gesture. At this point, you have the opportunity to customize or modify the context menu, or to prevent the menu from opening entirely by calling event.preventDefault() within the event handler. | EditorContextMenuOpeningEventArgs |
OnContextMenuClose | EventCallback<Event> | This event is triggered whenever the Context Menu is closed, either by user action (such as clicking outside the menu, selecting a menu item, or pressing the Escape key) or programmatically through the relevant API. Handlers for this event can be used to perform clean-up tasks or update the user interface in response to the Context Menu being dismissed. | 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 whenever the Context Menu is closed, either by user action (such as clicking outside the menu, selecting a menu item, or pressing the Escape key) or programmatically through the relevant API. Handlers for this event can be used to perform clean-up tasks or update the user interface in response to the Context Menu being dismissed. | EditorContextMenuClosedEventArgs |
OnContextMenuClosing | EventCallback<Event> | This event is fired just before the Context Menu begins to close. By calling event.preventDefault() within the event handler, you can cancel the closing action, allowing you to override or delay the default behavior based on custom logic. | dynamic target- The toolbar that is the target of the operation. |
ContextMenuClosing | event EditorContextMenuClosingEventHandler | This event is fired just before the Context Menu begins to close. By calling event.preventDefault() within the event handler, you can cancel the closing action, allowing you to override or delay the default behavior based on custom logic. | EditorContextMenuClosingEventArgs |
OnResizeStart | EventCallback<Event> | This event is triggered when a user initiates the resizing of an image, table, or video element. It indicates that the resizing operation has begun, allowing you to implement custom behaviors or UI updates in response to the start of a resize action. | N/A |
ResizeStarted | event EditorResizeStartedEventHandler | This event is triggered when a user initiates the resizing of an image, table, or video element. It indicates that the resizing operation has begun, allowing you to implement custom behaviors or UI updates in response to the start of a resize action. | EditorResizeStartedEventArgs |
OnResizeEnd | EventCallback<Event> | This event is triggered when the user has completed resizing an image, table, or video element. It fires after the resizing action ends, allowing you to perform actions such as saving the new dimensions or updating the layout in response to the change. | dynamic target- The element that is resized (image/table or video). |
ResizeEnded | event EditorResizeEndedEventHandler | This event is triggered when the user has completed resizing an image, table, or video element. It fires after the resizing action ends, allowing you to perform actions such as saving the new dimensions or updating the layout in response to the change. | EditorResizeEndedEventArgs |
OnInlineToolbarOpen | EventCallback<Event> | This event is triggered whenever the inline Toolbar becomes visible to the user, such as when a user selects text or performs an action that causes the Toolbar to appear within the interface. Use this event to run custom logic or adjust UI elements in response to the Toolbar opening. | 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 whenever the inline Toolbar becomes visible to the user, such as when a user selects text or performs an action that causes the Toolbar to appear within the interface. Use this event to run custom logic or adjust UI elements in response to the Toolbar opening. | EditorInlineToolbarOpenedEventArgs |
OnInlineToolbarOpening | EventCallback<Event> | This event is fired just before the inline Toolbar begins to open. Developers can intercept this event and prevent the Toolbar from opening by invoking event.preventDefault() within the event handler. This allows for conditional control over the Toolbar's visibility based on custom application logic. | dynamic target- The toolbar that is the target of the operation. |
InlineToolbarOpening | event EditorInlineToolbarOpeningEventHandler | This event is fired just before the inline Toolbar begins to open. Developers can intercept this event and prevent the Toolbar from opening by invoking event.preventDefault() within the event handler. This allows for conditional control over the Toolbar's visibility based on custom application logic. | EditorInlineToolbarOpeningEventArgs |
OnInlineToolbarClose | EventCallback<Event> | This event is triggered whenever the inline toolbar is closed, either by user interaction (such as clicking outside the toolbar, pressing Esc, or selecting a toolbar option) or programmatically via code. It provides an opportunity to perform cleanup, update UI elements, or execute additional logic in response to the toolbar being dismissed. | 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 whenever the inline toolbar is closed, either by user interaction (such as clicking outside the toolbar, pressing Esc, or selecting a toolbar option) or programmatically via code. It provides an opportunity to perform cleanup, update UI elements, or execute additional logic in response to the toolbar being dismissed. | EditorInlineToolbarClosedEventArgs |
OnInlineToolbarClosing | EventCallback<Event> | This event is triggered immediately before the inline toolbar begins to close, allowing you to perform actions or cleanup tasks in response to the toolbar's closure. | 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 immediately before the inline toolbar begins to close, allowing you to perform actions or cleanup tasks in response to the toolbar's closure. | EditorInlineToolbarClosingEventArgs |
OnDropDownToolbarOpen | EventCallback<Event> | This event is triggered each time the Drop Down Toolbar becomes visible to the user, such as when it is expanded or opened. You can use this event to execute custom logic whenever the toolbar is displayed, for example, to load dynamic content or adjust UI elements within the toolbar. | 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 each time the Drop Down Toolbar becomes visible to the user, such as when it is expanded or opened. You can use this event to execute custom logic whenever the toolbar is displayed, for example, to load dynamic content or adjust UI elements within the toolbar. | EditorDropDownToolbarOpenedEventArgs |
OnDropDownToolbarOpening | EventCallback<Event> | This event is triggered just before the Drop Down Toolbar begins to open. Within the event handler, you can call event.preventDefault() to cancel the opening operation, allowing you to customize or prevent the display of the toolbar based on specific conditions. This provides an opportunity to implement custom logic before the toolbar becomes visible to the user. | dynamic target- The toolbar that is the target of the operation. |
DropDownToolbarOpening | event EditorDropDownToolbarOpeningEventHandler | This event is triggered just before the Drop Down Toolbar begins to open. Within the event handler, you can call event.preventDefault() to cancel the opening operation, allowing you to customize or prevent the display of the toolbar based on specific conditions. This provides an opportunity to implement custom logic before the toolbar becomes visible to the user. | EditorDropDownToolbarOpeningEventArgs |
OnDropDownToolbarClose | EventCallback<Event> | This event is triggered whenever the Drop Down Toolbar is closed, either by user interaction (such as clicking outside the toolbar or selecting an option) or programmatically via the application's code. Use this event to perform actions or update the user interface in response to the toolbar being dismissed. | 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 whenever the Drop Down Toolbar is closed, either by user interaction (such as clicking outside the toolbar or selecting an option) or programmatically via the application's code. Use this event to perform actions or update the user interface in response to the toolbar being dismissed. | EditorDropDownToolbarClosedEventArgs |
OnDropDownToolbarClosing | EventCallback<Event> | This event is fired when the Drop Down Toolbar begins its closing process. Within the event handler, you can prevent the toolbar from closing by invoking event.preventDefault(). This provides an opportunity to execute custom logic, such as confirming the action with the user or validating conditions before allowing the toolbar to close. | dynamic target- The toolbar that is the target of the operation. |
DropDownToolbarClosing | event EditorDropDownToolbarClosingEventHandler | This event is fired when the Drop Down Toolbar begins its closing process. Within the event handler, you can prevent the toolbar from closing by invoking event.preventDefault(). This provides an opportunity to execute custom logic, such as confirming the action with the user or validating conditions before allowing the toolbar to close. | EditorDropDownToolbarClosingEventArgs |
OnDialogOpen | EventCallback<Event> | This event is triggered when the Dialog Window is successfully opened and becomes visible to the user. | 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 when the Dialog Window is successfully opened and becomes visible to the user. | EditorDialogOpenedEventArgs |
OnDialogOpening | EventCallback<Event> | This event is fired immediately before the Dialog Window begins to open, giving developers an opportunity to perform actions or modify options prior to rendering. You can cancel the default behavior and prevent the Dialog Window from opening by calling event.preventDefault() within the event handler. | 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 fired immediately before the Dialog Window begins to open, giving developers an opportunity to perform actions or modify options prior to rendering. You can cancel the default behavior and prevent the Dialog Window from opening by calling event.preventDefault() within the event handler. | EditorDialogOpeningEventArgs |
OnDialogClose | EventCallback<Event> | This event is triggered whenever the Dialog Window is closed by the user, either through clicking the close button, pressing the escape key, or programmatically via code. It allows developers to execute custom actions or clean up resources after the dialog has been dismissed. | 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 whenever the Dialog Window is closed by the user, either through clicking the close button, pressing the escape key, or programmatically via code. It allows developers to execute custom actions or clean up resources after the dialog has been dismissed. | EditorDialogClosedEventArgs |
OnDialogClosing | EventCallback<Event> | This event is fired immediately before the Dialog Window begins to close. It provides an opportunity to execute custom logic or perform validation before the dialog is dismissed. The closure of the dialog can be canceled by calling event.preventDefault() within the event handler. | 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 fired immediately before the Dialog Window begins to close. It provides an opportunity to execute custom logic or perform validation before the dialog is dismissed. The closure of the dialog can be canceled by calling event.preventDefault() within the event handler. | EditorDialogClosingEventArgs |
OnImageUploadSuccess | EventCallback<Event> | This event is triggered when an image or video file has been uploaded successfully to the server. It indicates the completion of the upload process without errors, allowing you to perform additional actions such as displaying a success message or updating the user interface. | 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., dynamic serverResponse- The response of the remote server. |
ImageUploadSuccessed | event EditorImageUploadSuccessedEventHandler | This event is triggered when an image or video file has been uploaded successfully to the server. It indicates the completion of the upload process without errors, allowing you to perform additional actions such as displaying a success message or updating the user interface. | EditorImageUploadSuccessedEventArgs |
OnImageUploadFailed | EventCallback<Event> | This event is triggered when an attempt to upload an image or video fails, indicating that the file was not successfully transferred to the server due to an error or interruption during the upload process. | 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., dynamic serverResponse- The response of the remote server. |
ImageUploadFailed | event EditorImageUploadFailedEventHandler | This event is triggered when an attempt to upload an image or video fails, indicating that the file was not successfully transferred to the server due to an error or interruption during the upload process. | EditorImageUploadFailedEventArgs |
OnToobarItemClick | EventCallback<Event> | This event is triggered whenever a user clicks on an item within the Toolbar. It provides relevant information about the clicked item, allowing you to execute custom logic or actions in response to the user's interaction with the Toolbar. | dynamic originalEvent- The original click event., dynamic value- The name of the toolbar item that was clicked. |
ToobarItemClicked | event EditorToobarItemClickedEventHandler | This event is triggered whenever a user clicks on an item within the Toolbar. It provides relevant information about the clicked item, allowing you to execute custom logic or actions in response to the user's interaction with the Toolbar. | EditorToobarItemClickedEventArgs |
OnMessageClose | EventCallback<Event> | This event is triggered whenever a user closes a message, such as dismissing a notification or alert. It allows you to execute custom logic in response to the message being removed from the user interface. | dynamic instance- The toast item that is the target of the operation. |
MessageClosed | event EditorMessageClosedEventHandler | This event is triggered whenever a user closes a message, such as dismissing a notification or alert. It allows you to execute custom logic in response to the message being removed from the user interface. | EditorMessageClosedEventArgs |
OnMessageOpen | EventCallback<Event> | This event is triggered whenever a user opens or views a message, indicating that the message content has become visible or active in the user interface. It can be used to track message engagement, update message status, or initiate follow-up actions when a message is accessed. | dynamic instance- The toast item that is the target of the operation. |
MessageOpened | event EditorMessageOpenedEventHandler | This event is triggered whenever a user opens or views a message, indicating that the message content has become visible or active in the user interface. It can be used to track message engagement, update message status, or initiate follow-up actions when a message is accessed. | EditorMessageOpenedEventArgs |
Enums
EditorContentFilteringAttributeFilterMode
EditorContentFilteringAttributeFilterMode.BlackList |
EditorContentFilteringAttributeFilterMode.WhiteList |
EditorContentFilteringTagFilterMode
EditorContentFilteringTagFilterMode.BlackList |
EditorContentFilteringTagFilterMode.WhiteList |
EditorContentFilteringStyleAttributeFilterMode
EditorContentFilteringStyleAttributeFilterMode.BlackList |
EditorContentFilteringStyleAttributeFilterMode.WhiteList |
EditorContextMenu
EditorContextMenu.Default |
EditorContextMenu.Browser |
EditorContextMenu.None |
EditMode
EditMode.Html |
EditMode.Markdown |
EditMode.BlockHtml |
EditorImageFormat
EditorImageFormat.Base64 |
EditorImageFormat.Blob |
PasteFormat
PasteFormat.Prompt |
PasteFormat.PlainText |
PasteFormat.KeepFormat |
PasteFormat.CleanFormat |
ToolbarMode
ToolbarMode.Menu |
ToolbarMode.SingleLineRibbon |
ToolbarViewMode
ToolbarViewMode.Toggle |
ToolbarViewMode.MultiRow |
ToolbarViewMode.Scroll |
EditorAi Properties
Name | Type | Default | Description |
---|---|---|---|
Model | string | "gpt-3.5-turbo" | The AI model used for text generation or other AI-powered features. |
MaxTokens | int | 200 | The maximum number of tokens (words/characters) the AI can generate in a single request |
Temperature | double | 0.7 | Controls the randomness of AI output. Lower values produce more focused results; higher values are more creative. |
Url | string | "" | The endpoint URL for sending AI requests, typically your backend proxy to OpenAI or another provider. |
Key | string | "" | The API key used to authenticate requests to the AI provider. |
EditorContentFiltering Properties
Name | Type | Default | Description |
---|---|---|---|
Attributes | string[] | new string[]{} | Determines which element attributes to filter. |
AttributeFilterMode | EditorContentFilteringAttributeFilterMode | EditorContentFilteringAttributeFilterMode.BlackList | Determines whether to allow (whiteList) or remove (blackList) the specified attributes. |
Tags | string[] | new string[]{} | Determines which element tags to filter. |
TagFilterMode | EditorContentFilteringTagFilterMode | EditorContentFilteringTagFilterMode.BlackList | Determines whether to allow (whiteList) or remove (blackList) the specified tags. |
StyleAttributes | string[] | new string[]{} | Determines which style attributes to filter. |
StyleAttributeFilterMode | EditorContentFilteringStyleAttributeFilterMode | EditorContentFilteringStyleAttributeFilterMode.BlackList | Determines whether to allow (whiteList) or remove (blackList) the specified style attributes. |
EditorDataExport Properties
Name | Type | Default | Description |
---|---|---|---|
Style | object | null | Sets a custom style object of the dataExport. |
FileName | string | "jqxScheduler" | Sets the exported file's name. |
PageOrientation | string | "portrait" | Sets the page orientation, when exporting to PDF. |
EditorIframeSettings Properties
Name | Type | Default | Description |
---|---|---|---|
Attributes | object | null | Determines the attributes and their values that will be set to the iframe. Here's how to define attributes: attributes: { height: 500 } |
Enabled | bool | false | Enables/Disables the usage of an iframe for the content of the Editor. |
Resources | string | "portrait" | Determines the resources like scripts/styles that will be imported into the iframe. Here's how to define resources: resources: { 'style': { href: 'styles.css' }, 'script': { src: 'index.js', type: 'module' }} |
EditorToolbarItem Properties
Name | Type | Default | Description |
---|---|---|---|
Name | string | "" | The unique name of the toolbar item. The list of all possible names is available in the description above. |
Disabled | bool | false | Determines whethet the item is disabled or not. |
Advanced | bool | false | Applicable only to item 'paste'. Transforms the type of the Paste toolbar item to drop down list with paste format options. |
DataSource | IEnumerable<object> | new List<object>() | Allows to set a different dataSource for the toolbar items of type 'drop-down' or 'color-input. |
InlineToolbarItems | IEnumerable<object> | new List<object>() | Defines the list of toolbar items for the Inline Toolbar. Accept the same values as toolbarItems property. |
Editor | ToolbarItemEditor | new ToolbarItemEditor() | Allows to set predefined values for the Dialog Window of the following toolbar items: 'table', 'image', 'video', 'hyperlink'. |
Template | object | null | Allows to set a template for a custom Toolbar item when the name attribute is set to 'custom'. |
Width | object | "" | Determines the width of the toolbar item. |
ToolbarItemEditor Properties
Name | Type | Default | Description |
---|---|---|---|
Address | string | "" | Allows to preset the value for the hyperlink address field in the Dialog Window. |
Target | string | "" | Allows to preset the value for the hyperlink target field in the Dialog Window. |
Text | string | "" | Allows to preset the value for the hyperlink text field in the Dialog Window. |
Title | string | "" | Allows to preset the value for the hyperlink/image title field in the Dialog Window. |
File | object | null | Allows to preset the value for the image/video file uploader in the Dialog Window. |
Alt | string | "" | Allows to preset the value for the image/video alt field in the Dialog Window. |
Url | string | "" | Allows to preset the value for the image/video url field in the Dialog Window. |
Width | object | "" | Allows to preset the value for the image/table/video width field in the Dialog Window. |
Height | object | "" | Allows to preset the value for the image/table/video height field in the Dialog Window. |
Caption | string | "" | Allows to preset the value for the image/video caption field in the Dialog Window. |
Alignment | string | "" | Allows to preset the value for the image/video alignment field in the Dialog Window. |
Display | string | "" | Allows to preset the value for the image/video display field in the Dialog Window. |
Draggable | bool | false | Allows to preset the value for the image draggable field in the Dialog Window. |
Resizable | bool | false | Allows to preset the value for the image/table/video resizable field in the Dialog Window. |
Cols | object | "" | Allows to preset the value for the table cols field in the Dialog Window. |
Rows | object | "" | Allows to preset the value for the table rows field in the Dialog Window. |
Tableheader | bool | false | Allows to preset the value for the table header field in the Dialog Window. |
Altrows | bool | false | Allows to preset the value for the table altrows field in the Dialog Window. |
Dashedborders | bool | false | Allows to preset the value for the table dashedborders field in the Dialog Window. |