The EditorCore object
True if this action can be undone when user press Backspace key (aka Auto Complete).
@optional Entity states related to this snapshot. Each entity state will cause an EntityOperation event with operation = EntityOperation.UpdateEntityState when undo/redo to this snapshot
Announce the given data
The EditorCore object
Data to announce
Function type to apply metadata value into format
The metadata object to apply
The format object to apply metadata to
Content Model to DOM context
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
Format of background color
Background color
Format of bold
Font weight of the element
Format of border box
Whether use border-box for this element
Format of border
Bottom border in format 'width style color'
Radius to be applied in bottom left corner
Radius to be applied in bottom right corner
Left border in format 'width style color'
Radius to be applied in all borders corners
Right border in format 'width style color'
Top border in format 'width style color'
Radius to be applied in top left corner
Radius to be applied in top right corner
All Border operations
Format of box shadow
Box shadow in format "offset-x offset-y blur-radius spread-radius color"
Represents a selection used for cache
Function type used for cloneModel API to specify how to handle cached element when clone a model
The cached node
Type of the node, it can be
A util function type to transform light mode color to dark mode color Default value is to return the original light color
Source color string in light mode
Base value of light used for dark value calculation
@optional Type of color, can be text, background, or border
@optional Source HTML element of the color
Specify how to handle conflicts when retrieving format state remove: removes the conflicting key from the result keepFirst: retains the first value of the conflicting key returnMultiple: sets 'Multiple' as the value if the conflicting value's type is string
A union type of Content Model Block
The format object for a paragraph in Content Model
The union type of Content Model Block Group
Type of Block Group in Content Model
Type of Content Model to DOM handler for block
Target HTML Document object
Parent HTML node to append the new node from the given model
The Content Model to handle
The context object to provide related information
Reference node. This is the next node the new node to be inserted. It is used when write DOM tree onto existing DOM true. If there is no reference node, pass null.
Type of Block in Content Model
The format object for a code element in Content Model
Union type for segment decorators
The format object for a divider in Content Model
The format object for an entity in Content Model
Base type of content model format. All content model format should only have simple value type (string, number, boolean). So that we can use a single level copy ({...object}) to easily clone a format object
Type for FormatContainer
Type of formatter used for format Content Model.
The source Content Model to format
A context object used for pass in and out more parameters
True means the model is changed and need to write back to editor, otherwise false
Type of Content Model to DOM handler
Target HTML Document object
Parent HTML node to append the new node from the given model
The Content Model to handle
The context object to provide related information
Represents a map from content model handler name to its handle type
Content Model type for ContentModelBlock
Content Model type for child models of ContentModelBlockGroup
Content Model type for ContentModelBr
Content Model type for ContentModelHR
Content Model type for child models of ContentModelEntity
Content Model type for child models of ContentModelEntity
Content Model type for ContentModelFormatContainer
Content Model type for ContentModelGeneralBlock
Content Model type for ContentModelGeneralBlock
Content Model type for ContentModelImage
Content Model type for list group of ContentModelListItem
Content Model type for list item of ContentModelListItem
Content Model type for ContentModelParagraph
Content Model type for ContentModelSegment
Content Model type for ContentModelCode
Content Model type for ContentModelTable
Content Model type for ContentModelText
The format object for a hyperlink in Content Model
The format object for an image in Content Model
The format object for a list item in Content Model
The format object for a list level in Content Model
Union type of Content Model Segment
The format object for a segment in Content Model
Type of Content Model to DOM handler for block
Target HTML Document object
Parent HTML node to append the new node from the given model
The Content Model to handle
The context object to provide related information
Nodes that created to represent this segment. In most cases there will be one node returned, except
Type of Segment in Content Model
Format of table cell
Format of Table
Represents base format of an element that supports dataset and/or metadata
Create Content Model from DOM tree in this editor
The EditorCore object
The option to customize the behavior of DOM to Content Model conversion
When passed a valid selection, use this selection range instead of current selection in editor. When pass "none", it means we don't need a selection in content model
Create a EditorContext object used by ContentModel API
The EditorCore object
True to allow saving index info into node using domIndexer, otherwise false
Handler function type of DOM event
The union type of 3 selection types
Represents dataset format of Content Model
Default implicit format map from tag name (lower case) to segment format
A type of Default style map, from tag name string (in upper case) to a static style object
A combination of all definition types
Types of definitions, used by Definition type
Delete selection result
Represents a step function for deleteSelection API
The valid delete selection context object returned from previous step
Format of direction
Text direction
Format of display
Display of this element
A map from format parser category name to an array of parsers. This is for HTMLElement only
A map from format parser category name to an array of parsers. This is for HTML Element only
A function type to process HTML element when do DOM to Content Model conversion
Parent content model group
The element to process
The context object to provide related information
A map from element processor name to its processor type
Format of entity type
Type of this entity
For a readonly DOM element, we also treat it as entity, with isFakeEntity set to true
Whether the entity is readonly
Define entity lifecycle related operations
Define possible operations to an entity
Define entity removal related operations
Predefined experiment features By default these features are not enabled. To enable them, pass the feature name into EditorOptions.experimentalFeatures when create editor
The mode parameter type for exportContent API
Format of float
Float style
Focus to editor. If there is a cached selection range, use it as current selection
The EditorCore object
Format of font family
Font family
Format of font size
Font size
Apply format to the given HTML element
The format object to apply
The HTML element to apply format to
The context object that provide related context information
All format appliers
A map from format parser category name to an array of parsers
The general API to do format change with Content Model It will grab a Content Model for current editor content, and invoke a callback function to do format change. Then according to the return value, write back the modified content model into editor. If there is cached model, it will be used and updated.
The EditorCore object
Formatter function, see ContentModelFormatter
More options, see FormatContentModelOptions
Key of all format handler
Parse format from the given HTML element and default style
The format object to parse into
The HTML element to parse format from
The context object that provide related context information
Default CSS style of the given HTML element
All format parsers
A map from format parser category name to an array of parsers
A type map from name of plugin with state to its plugin type
Get current DOM selection from editor
The EditorCore object
Retrieves the rect of the visible viewport of the editor.
The EditorCore object
Format of HTML align attribute
Horizontal alignment, from HTML attribute "align"
Format for element with Id
Id of the element
Metadata for inline image crop
Bottom cropped percentage. Rotation or resizing won't impact this percentage value
Left cropped percentage. Rotation or resizing won't impact this percentage value
Right cropped percentage. Rotation or resizing won't impact this percentage value
Top cropped percentage. Rotation or resizing won't impact this percentage value
Type of image editing operations
Metadata for inline image
Metadata for inline image resize
Height after resize, in px. If image is cropped, this is the height of visible part If image is rotated, this is the height before rotation
Width after resize, in px. If image is cropped, this is the width of visible part If image is rotated, this is the width before rotation
Metadata for inline image rotate
Rotated angle of inline image, in radian. Cropping or resizing won't impact this percentage value
Define the position of the entity to insert. It can be: "focus": insert at current focus. If insert a block entity, it will be inserted under the paragraph where focus is "begin": insert at beginning of content. When insert an inline entity, it will be wrapped with a paragraph. "end": insert at end of content. When insert an inline entity, it will be wrapped with a paragraph. "root": insert at the root level of current region
Format of italic
Whether it is in italic
The callback function type for iterateSelections
The block group path of current selection
Table context of current selection
Block of current selection
Segments of current selection
True to stop iterating, otherwise keep going
Names of the core plugins that have plugin state
Known announce strings
Format of letter spacing
letter-spacing style
Format of line height
Line height of this block
Format of hyper link
Class attribute of anchor element
Id of anchor element
Title attribute of anchor element
Href of the hyper link
Name of this link
Rel attribute of anchor element
Target of the hyper link
Format of list / list item that stored as metadata
When set to true, if there is no orderedStyleType (for OL) or unorderedStyleType (for UL) specified, use the list from its level For ordered list, the default list styles from levels are: 'decimal', 'lower-alpha', 'lower-roman', then loop For unordered list, the default list styles from levels are: 'disc', 'circle', 'square', then loop
Style type for Ordered list. Use value of constant NumberingListType as value.
Style type for Unordered list. Use value of constant BulletListType as value.
Format of list-style
list-style-position
list-style-type
Format of list thread id
For a list item, it should have "list-item" (default value) for display style. In those case, we will leave displayForDummyItem as undefined. But if there is other value than "list-item" in display style, we store it here and treat this item as a dummy item. Dummy item won't have list bullet or number, and we won't add 1 for list number for such items
When restart a new list thread, set this value to be the restart number. Otherwise, leave it undefined to continue last list
Format of margin
Margin bottom value
Margin left value
Margin right value
Margin top value
A function type used by merging pasted content into current Content Model
Target Content Model to merge into
Source Content Model to merge from
Insert point after merge
Map of metadata handlers
Metadata handler for list item
Metadata handler for list level
Callback function type for converting a given Content Model object to plain text
The source model object to be converted to plain text
Callback function type for checking if we should convert to text for the given content model object
The source model to check if we should convert it to plain text
Mark an object as mutable
The mutable marker to mark an object as mutable. When assign readonly object to a mutable type, compile will fail to build due to this member does not exist from source type.
The mutable marker to mark an object as mutable. When assign readonly object to a mutable type, compile will fail to build due to this member does not exist from source type.
Get mutable type from its related readonly type
Object property definition type used by Object Definition
An optional callback that will be called when a DOM node is created
The related Content Model element
The node created for this model element
Represent a pair of parent block group and child block
The child block
The parent block group
Selection path of this block
Format of padding
Padding bottom value
Padding left value
Padding right value
Padding top value
Represents a parsed table with its table cells
Parse a table, this type represents a parsed table cell. It can be a cell element, or a string to indicate where it is spanned from
Specify what type of content to paste
Represents the PasteType parameter used to set the paste type to use. It can be either the Paste Type value or a callback that retuns the Paste Type to use.
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
Type of plugin events
Names of core plugins
Auto-calculated State object type for plugin with states
A union type of Content Model Block (Readonly)
The union type of Content Model Block Group (Readonly)
Union type for segment decorators (Readonly)
Union type of Content Model Segment (Readonly)
Represents base format of an element that supports dataset and/or metadata (Readonly)
Represents dataset format of Content Model (Readonly)
The callback function type for iterateSelections (Readonly)
The block group path of current selection
Table context of current selection
Block of current selection
Segments of current selection
True to stop iterating, otherwise keep going
Mark an object as readonly
The mutable marker to mark an object as mutable. When assign readonly object to a mutable type, compile will fail to build due to this member does not exist from source type. This is used for preventing assigning ReadonlyMark to ShallowMutableMark or MutableMark
The mutable marker to mark an object as mutable. When assign readonly object to a mutable type, compile will fail to build due to this member does not exist from source type.
Represent a pair of parent block group and child block (Readonly)
The child block
The parent block group
Selection path of this block
Restore an undo snapshot into editor
The EditorCore object
Type of DOM selection, it can be one of the 3 below: range: A regular selection that can be represented by a DOM Range object with start and end container and offset table: A table selection that can be defined using the Table element and first/last row and column number. Table selection can cover multiple table cells, it does not need to be continuous, but it should be a rectangle image: A image selection that can be defined with an image element. Not like a regular range selection with an image, image selection is created when user single click the image, then we will show a selection border rather the blue background to show the selection
Set content with content model. This is the replacement of core API getSelectionRangeEx
The EditorCore object
The content model to set
Additional options to customize the behavior of Content Model to DOM conversion
An optional callback that will be called when a DOM node is created
Set current DOM selection from editor. This is the replacement of core API select
The EditorCore object
The selection to set
@param Pass true to skip triggering a SelectionChangedEvent
Add CSS rules for editor
The EditorCore object
A string to identify the CSS rule type. When set CSS rules with the same key again, existing rules with the same key will be replaced.
The CSS rule string, must be a valid CSS rule string, or browser may throw exception. Pass null to remove existing rules
@optional If the rule is used for child element under editor, use this parameter to specify the child elements. Each item will be combined with root selector together to build a separate rule. It also accepts pseudo classes "before" and "after" to create pseudo class rule "::before" and "::after" to the editor root element itself
@optional Set maximum length for a single rule. This is used by test code only
Set a new logical root (most likely due to focus change)
The EditorCore object
The new logical root (has to be child of physicalRoot or null to use physicalRoot as logical root)
A union type of Content Model Block (Shallow mutable)
The union type of Content Model Block Group (Shallow mutable)
Union type of Content Model Segment (Shallow mutable)
Represents base format of an element that supports dataset and/or metadata (Readonly)
Mark an object as single level mutable (child models are still readonly)
The mutable marker to mark an object as mutable. When assign readonly object to a mutable type, compile will fail to build due to this member does not exist from source type.
The mutable marker to mark an object as mutable. When assign readonly object to a mutable type, compile will fail to build due to this member does not exist from source type. This is used for preventing assigning ShallowMutableMark to MutableMark
Format of element size
Height of the element
Maximum height of the element
Maximum width of the element
Minimum height of the element
Minimum width of the element
Width of the element
Union type for all 3 selection types for Undo Snapshot
Format of spacing
Whether borders of cells are collapsed together
Whether borders of cells are separated
All names of plugins with plugin state
Format of strikethrough
Whether it has strike through
Format of superscript/subscript
Sequence of superscript/subscript e.g. sub super sub
Switch the Shadow Edit mode of editor On/Off
The EditorCore object
True to switch On, False to switch Off
Operations used by editTable() API for align table
Operations used by editTable() API for align table cell horizontally
Operations used by editTable() API for merge selected table cells
Format of table cell that stored as metadata
Override default background color
Override default border value
Override default vertical align value
Operations used by editTable() API for align table cell vertically
Operations used by editTable() API for delete table cells
Operations used by editTable() API for insert table cell horizontally
Operations used by editTable() API for merge table cells horizontally
Format of Table Layout
Whether borders of cells are collapsed together
Format of table that stored as metadata
Background color for even row or even columns
Background color for odd row or odd columns
Bottom border color for each row
Set banded columns
Set banded rows
Set first column
Set header row
Header row background color for even cells
Table Borders Type. Use value of constant TableBorderFormat as value
Top border color for each row
Vertical alignment for each row
Vertical border color for each row
Operations used by editTable() API
Operations used by editTable() API for split table cells
Operations used by editTable() API for insert table cell vertically
Operations used by editTable() API for merge table cells vertically
Format of text-align
Horizontal alignment, from CSS "text-align"
Format of text color
Text color
Apply format to the given text node
The format object to apply
The text node to apply format to
The context object that provide related context information
Parse format from the given text node
The format object to parse into
The text node to parse format from
The context object that provide related context information
Format of text-indent
Due to the special behavior of text-indent style, we need to know if this text-indent style is already applied to any child block. Then after that, we can ignore it for the block at the same level.
Text indent of a paragraph
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
Retrieve block group type string from a given block group
Get type of a plugin with state
Format of underline
Whether it has underline
Specify how to sanitize a value, can be a callback function or a boolean value. True: Keep this value False: Remove this value A callback: Let the callback function to decide how to deal this value.
Format of vertical alignment
Vertical alignment
Format of white space
White space
Format of word break
Word break CSS value
Generated using TypeDoc
Add an undo snapshot to current undo snapshot stack