Set background color of cells.
The editor instance
One of two options:
Split selection into regions, and perform a block-wise formatting action for each region.
Change the capitalization of text in the selection
The editor instance
The case option
Optional parameter for language string that should comply to "IETF BCP 47 Tags for Identifying Languages". For example: 'en' or 'en-US' for English, 'tr' for Turkish. Default is the host environment’s current locale.
Increase or decrease font size in selection
The editor instance
Whether increase or decrease font size
A sorted font size array, in pt. Default value is FONT_SIZES
The editor instance
Clear the format in current selection, after cleaning, the format will be changed to default format. The format that get cleaned include B/I/U/font name/ font size/text color/background color/align left/align right/align center/superscript/subscript
The editor instance
type of format to apply
Commit changes of all list changes when experiment features are allowed
The Editor object
List chains to commit
Insert a hyperlink at cursor. When there is a selection, hyperlink will be applied to the selection, otherwise a hyperlink will be inserted to the cursor position.
Editor object
Link address, can be http(s), mailto, notes, file, unc, ftp, news, telnet, gopher, wais. When protocol is not specified, a best matched protocol will be predicted.
Optional alt text of the link, will be shown when hover on the link
Optional display text for the link.
Optional display target for the link ("_blank"|"_self"|"_parent"|"_top"|"{framename}") If specified, the display text of link will be replaced with this text. If not specified and there wasn't a link, the link url will be used as display text.
Edit table with given operation. If there is no table at cursor then no op.
The editor instance
Table operation
Format table
The editor which contains the table to format
A TableFormat object contains format information we want to apply to the table
The table to format. This is optional. When not passed, the current table (if any) will be formatted
Get element based Format State at cursor
The editor instance
(Optional) The plugin event, it stores the event cached data for looking up. In this function the event cache is used to get list state and heading level. If not passed, it will query the node within selection to get the info
An ElementBasedFormatState object
Get format state at cursor A format state is a collection of all format related states, e.g., bold, italic, underline, font name, font size, etc.
The editor instance
(Optional) The plugin event, it stores the event cached data for looking up. In this function the event cache is used to get list state and heading level. If not passed, it will query the node within selection to get the info
The format state at cursor
Insert an entity into editor.
The editor to insert entity into.
Type of the entity
Root element of the entity
Whether the entity will be shown as a block
Whether the entity will be a readonly entity
@optional The position to insert into. If not specified, current position will be used. If isBlock is true, entity will be insert below this position
@optional When pass true, insert the entity at the root level of current region. Parent nodes will be split if need
@optional When pass true, focus will be moved next to the entity. For inline entity, focus will be after right after the entity (and the delimiter if exist). For block entity, focus will be in the new empty line below the entity
Insert an image to editor at current selection
The editor instance
Either the image file blob or source string of the image.
Optional image element attributes
Insert table into editor at current selection
The editor instance
Number of columns in table, it also controls the default table cell width: if columns <= 4, width = 120px; if columns <= 6, width = 100px; else width = 70px
Number of rows in table
(Optional) The table format. If not passed, the default format will be applied: background color: #FFF; border color: #ABABAB
Remove link at selection. If no links at selection, do nothing. If selection contains multiple links, all of the link styles will be removed. If only part of a link is selected, the whole link style will be removed.
The editor instance
Replace text before current selection with a node, current selection will be kept if possible
The editor instance
The text for matching. We will try to match the text with the text before cursor
The node to replace the text with
True if the text must appear exactly before selection, otherwise there can be some text between the target text and selection
Optional PositionContentSearcher of current selection to help search text
Replace a given range with a node, current selection will be kept if possible
The editor instance
The range to replace from
The node to replace the text with
True if the text must appear exactly before selection, otherwise there can be some text between the target text and selection
Rotate an element visually
The editor instance
The element that should be rotated
The degree at which to rotate the element from it's center
Set content alignment
The editor instance
The alignment option: Alignment.Center, Alignment.Left, Alignment.Right
Set background color at current selection
The editor instance
One of two options: The color string, can be any of the predefined color names (e.g, 'red') or hexadecimal color string (e.g, '#FF0000') or rgb value (e.g, 'rgb(255, 0, 0)') supported by browser. Currently there's no validation to the string, if the passed string is invalid, it won't take effect Alternatively, you can pass a @typedef ModeIndependentColor. If in light mode, the lightModeColor property will be used. If in dark mode, the darkModeColor will be used and the lightModeColor will be used when converting back to light mode.
Change direction for the blocks/paragraph at selection
The editor instance
The direction option: Direction.LeftToRight refers to 'ltr', Direction.RightToLeft refers to 'rtl'
Set font name at selection
The editor instance
The fontName string, should be a valid CSS font-family style. Currently there's no validation to the string, if the passed string is invalid, it won't take affect
Set font size at selection
The editor instance
The fontSize string, should be a valid CSS font-size style. Currently there's no validation to the string, if the passed string is invalid, it won't take affect
Set heading level at selection
The editor instance
The heading level, can be a number from 0 to 6, in which 1 ~ 6 refers to the HTML heading element <H1> to <H6>, 0 means no heading if passed in param is outside the range, will be rounded to nearest number in the range
Set image alt text for all selected images at selection. If no images is contained in selection, do nothing. The alt attribute provides alternative information for an image if a user for some reason cannot view it (because of slow connection, an error in the src attribute, or if the user uses a screen reader). See https://www.w3schools.com/tags/att_img_alt.asp
The editor instance
The image alt text
Set indentation at selection If selection contains bullet/numbering list, increase/decrease indentation will increase/decrease the list level by one.
The editor instance
The indentation option: Indentation.Increase to increase indentation or Indentation.Decrease to decrease indentation
Resets Ordered List Numbering back to the value of the parameter startNumber
The editor instance
The HTML element that indicates when to split the VList
The number of that the splitted list should start
Set text color at selection
The editor instance
One of two options: The color string, can be any of the predefined color names (e.g, 'red') or hexadecimal color string (e.g, '#FF0000') or rgb value (e.g, 'rgb(255, 0, 0)') supported by browser. Currently there's no validation to the string, if the passed string is invalid, it won't take affect Alternatively, you can pass a @typedef ModeIndependentColor. If in light mode, the lightModeColor property will be used. If in dark mode, the darkModeColor will be used and the lightModeColor will be used when converting back to light mode.
Optional callback function to be invoked to verify if the current element should have the inline Style applied
Toggle blockquote at selection, if selection already contains any blockquote elements, the blockquote elements will be unquote and other elements will take no effect
The editor instance
(Optional) The custom styler for setting the style for the blockquote element
Toggle bold at selection If selection is collapsed, it will only affect the following input after caret If selection contains only bold text, the bold style will be removed If selection contains only normal text, bold style will be added to the whole selected text If selection contains both bold and normal text, bold style will be added to the whole selected text
The editor instance
Toggle bullet at selection If selection contains bullet in deep level, toggle bullet will decrease the bullet level by one If selection contains number list, toggle bullet will convert the number list into bullet list If selection contains both bullet/numbering and normal text, the behavior is decided by corresponding browser execCommand API
The editor instance
(Optional) the style of the bullet list. If not defined, the style will be set to disc.
(Optional) Set a new api name, if empty the api name will be 'toggleListType'.
Toggle code block at selection, if selection already contains any code blocked elements, the code block elements will be no longer be code blocked and other elements will take no affect
The editor instance
(Optional) The custom styler for setting the style for the code block element
Toggle italic at selection If selection is collapsed, it will only affect the input after caret If selection contains only italic text, the italic style will be removed If selection contains only normal text, italic style will be added to the whole selected text If selection contains both italic and normal text, italic style will be added to the whole selected text
The editor instance
Toggle List Type at selection If ListType Provided is Ordered: If selection contains numbering in deep level, toggle numbering will decrease the numbering level by one If selection contains bullet list, toggle numbering will convert the bullet list into number list If selection contains both bullet/numbering and normal text, the behavior is decided by corresponding realization of browser execCommand API If ListType Provided is Unordered: If selection contains bullet in deep level, toggle bullet will decrease the bullet level by one If selection contains number list, toggle bullet will convert the number list into bullet list If selection contains both bullet/numbering and normal text, the behavior is decided by corresponding browser execCommand API
The editor instance
The list type to toggle
(Optional) Start number of the list
Sets wether the operation should include Sibling Lists, by default true
(Optional) the style of an ordered. If not defined, the style will be set to decimal.
(Optional) the style of an unordered list. If not defined, the style will be set to disc.
(Optional) Set a new api name, if empty the api name will be 'toggleListType'.
Toggle numbering at selection If selection contains numbering in deep level, toggle numbering will decrease the numbering level by one If selection contains bullet list, toggle numbering will convert the bullet list into number list If selection contains both bullet/numbering and normal text, the behavior is decided by corresponding realization of browser execCommand API
The editor instance
(Optional) Start number of the list
(Optional) The style of the numbering list. If not defined, the style will be set to decimal.
(Optional) Set a new api name, if empty the api name will be 'toggleListType'.
Toggle strikethrough at selection If selection is collapsed, it will only affect the input after caret If selection contains only strikethrough text, the strikethrough style will be removed If selection contains only normal text, strikethrough style will be added to the whole selected text If selection contains both strikethrough and normal text, strikethrough style will be added to the whole selected text
The editor instance
Toggle subscript at selection If selection is collapsed, it will only affect the input after caret If selection contains only subscript text, the subscript style will be removed If selection contains only normal text, subscript style will be added to the whole selected text If selection contains both subscript and normal text, the subscript style will be removed from whole selected text If selection contains any superscript text, the behavior is determined by corresponding realization of browser execCommand API
The editor instance
Toggle superscript at selection If selection is collapsed, it will only affect the input after caret If selection contains only superscript text, the superscript style will be removed If selection contains only normal text, superscript style will be added to the whole selected text If selection contains both superscript and normal text, the superscript style will be removed from whole selected text If selection contains any subscript text, the behavior is determined by corresponding realization of browser execCommand API
The editor instance
Toggle underline at selection If selection is collapsed, it will only affect the input after caret If selection contains only underlined text, the underline style will be removed If selection contains only normal text, underline style will be added to the whole selected text If selection contains both underlined and normal text, the underline style will be added to the whole selected text
The editor instance
Generated using TypeDoc
Default font size sequence, in pt. Suggest editor UI use this sequence as your font size list, So that when increase/decrease font size, the font size can match the sequence of your font size picker