The EditorCore object
The editing callback, accepting current selection start and end position, returns an optional object used as the data field of ContentChangedEvent.
The ChangeSource string of ContentChangedEvent. @default ChangeSource.Format. Set to null to avoid triggering ContentChangedEvent
True if this action can be undone when user press Backspace key (aka Auto Complete).
Optional parameter to provide additional data related to the ContentChanged Event.
A type template to get item type of an array
Attach a DOM event to the editor content DIV
The EditorCore object
A map from event name to its handler
Attribute callback, will be called when HtmlSanitizer process an attribute with given name
Value of the attribute
The HTML element contains this attribute
A context object to store values which can used for communicating among callbacks
null to remove this attribute, otherwise keep the attribute with the value returned
A map of attribute callbacks. Tag name should be in lower case
This represents a PluginEvent wrapping native browser event
The interface represents a PluginEvent wrapping native Keyboard event
This interface represents a PluginEvent wrapping native Mouse event
ContentEditFeature interface that handles keyboard event
A content metadata is a data structure storing information other than HTML content, such as dark mode info, selection info, ...
Type of Editor Core Creator
The DIV HTML element which will be the container element of editor
An optional options object to customize the editor
Create a DocumentFragment for paste from a ClipboardData
The EditorCore object.
Clipboard data retrieved from clipboard
The position to paste to
True to force use plain text as the content to paste, false to choose HTML or Image if any
True if apply format of current selection to the pasted content, false to keep original format
Style callback, will be called when HtmlSanitizer process an inline CSS style with given name
Value of the CSS rule
The HTML element contains this CSS style
Current values of known inheritable styles
A context object to store values which can used for communicating among callbacks
True if this rule should be kept, otherwise false
A map of style callbacks. Style name should be in lower case
Combined event handler type with all 3 possibilities
Handler function type of DOM event
A combination of all definition types
Element callback, will be called when HtmlSanitizer process an element with the given tag
The HTML element
A context object to store values which can used for communicating among callbacks
True if this element should be kept, otherwise false
A map of elements callback. Tag name should be in upper case
Ensure user will type into a container element rather than into the editor content DIV directly
The EditorCore object.
The position that user is about to type to
Optional keyboard event object
Deprecated parameter, not used
Focus to editor. If there is a cached selection range, use it as current selection
The EditorCore object
A type map from name of plugin with state to its plugin type
Get current editor content as HTML string
The EditorCore object
specify what kind of HTML content to retrieve
HTML string representing current editor content
Get the pendable format such as underline and bold
The EditorCore object
If set to true, will force get the format state from DOM tree.
The pending format state of editor.
Get current or cached selection range
The EditorCore object
Set to true to retrieve the selection range from cache if editor doesn't own the focus now
A Range object of the selection range
Get current selection range
The EditorCore object
A Range object of the selection range
Get style based format state from current selection, including font name/size and colors
The EditorCore objects
The node to get style from
Check if the editor has focus now
The EditorCore object
True if the editor has focus, otherwise false
Insert a DOM node into editor content
The EditorCore object. No op if null.
An insert option object to specify how to insert the node
Type definition for the InsertOption, used in the insertNode API. The position parameter defines how the node will be inserted. In a future revision, this will become strongly typed Only parameters applicable to the given position will be accepted.
Names of the core plugins that have plugin state
Object property definition type used by Object Definition
This represents a PluginEvent wrapping native browser event
Editor plugin event interface
A type to extract data part of a plugin event type. Data part is the plugin event without eventType field.
A type to extract data part of a plugin event type. Data part is the plugin event without eventType field. This type is a middle result and only used by PluginEventData type
A type to get specify plugin event type from eventType parameter.
A type to get specify plugin event type from eventType parameter. This type is a middle result and only used by PluginEventFromType type
Names of core plugins
The interface represents a PluginEvent wrapping native Keyboard event
This interface represents a PluginEvent wrapping native Mouse event
Auto-calculated State object type for plugin with states
A map of predefined CSS styles for elements
Restore an undo snapshot into editor
The editor core object
Steps to move, can be 0, positive or negative
Select content according to the given information. There are a bunch of allowed combination of parameters. See IEditor.select for more details
The editor core object
A DOM Range, or SelectionRangeEx, or NodePosition, or Node, or Selection Path
(optional) A NodePosition, or an offset number, or a PositionType, or a TableSelection, or null
(optional) A Node
(optional) An offset number, or a PositionType
Select a table and save data of the selected range
The EditorCore object
image to select
true if successful
Change the editor selection to the given range
The EditorCore object
The range to select
When set to true, do nothing if the given range is the same with current selection in editor, otherwise it will always remove current selection range and set to the given one. This parameter is always treated as true in Edge to avoid some weird runtime exception.
Select a table and save data of the selected range
The EditorCore object
table to select
first and last cell of the selection, if this parameter is null, instead of selecting, will unselect the table.
true if successful
Types of ranges used in editor api getSelectionRangeEx
Set HTML content to this editor. All existing content will be replaced. A ContentChanged event will be triggered if triggerContentChangedEvent is set to true
The EditorCore object
HTML content to set in
True to trigger a ContentChanged event. Default value is true
A transformer function. It transform the size changes according to current situation. A typical scenario to use this function is when editor is located under a scaled container, so we need to calculate the scaled size change according to current zoom rate.
Original delta size from mouse event
Calculated delta size. By default it should just return original value
All names of plugins with plugin state
A map of attribute callbacks. Tag name should be in lower case
Switch the Shadow Edit mode of editor On/Off
The EditorCore object
True to switch On, False to switch Off
Format of table cell that stored as metadata
Override default background color
Override default border value
Override default vertical align value
Edit and transform color of elements between light mode and dark mode
The EditorCore object
The root HTML node to transform
True to transform the root node as well, otherwise false
The callback function to invoke before do color transformation
To specify the transform direction, light to dark, or dark to light
By default this function will only work when editor core is in dark mode. Pass true to this value to force do color transformation even editor core is in light mode
Trigger a plugin event
The EditorCore object
The event object to trigger
Set to true to skip the shouldHandleEventExclusively check
A handler type to convert HTML string to a trust HTML string
Get type of a plugin with state
Generated using TypeDoc
Call an editing callback with adding undo snapshots around, and trigger a ContentChanged event if change source is specified. Undo snapshot will not be added if this call is nested inside another addUndoSnapshot() call.