Options
All
  • Public
  • Public/Protected
  • All
Menu

The interface for the map of core API for Editor. Editor can call call API from this map under EditorCore object

Hierarchy

  • CoreApiMap

Index

Properties

addUndoSnapshot

addUndoSnapshot: AddUndoSnapshot

Add an undo snapshot to current undo snapshot stack

param

The EditorCore object

param

True if this action can be undone when user press Backspace key (aka Auto Complete).

param

@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

announce: Announce

Announce the given data

param

The EditorCore object

param

Data to announce

attachDomEvent

attachDomEvent: AttachDomEvent

Attach a DOM event to the editor content DIV

param

The EditorCore object

param

A map from event name to its handler

createContentModel

createContentModel: CreateContentModel

Create Content Model from DOM tree in this editor

param

The EditorCore object

param

The option to customize the behavior of DOM to Content Model conversion

createEditorContext

createEditorContext: CreateEditorContext

Create Content Model from DOM tree in this editor

param

The EditorCore object

param

The option to customize the behavior of DOM to Content Model conversion

param

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

focus

focus: Focus

Focus to editor. If there is a cached selection range, use it as current selection

param

The EditorCore object

formatContentModel

formatContentModel: FormatContentModel

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.

param

The EditorCore object

param

Formatter function, see ContentModelFormatter

param

More options, see FormatContentModelOptions

getDOMSelection

getDOMSelection: GetDOMSelection

Get current DOM selection from editor

param

The EditorCore object

getVisibleViewport

getVisibleViewport: GetVisibleViewport

Retrieves the rect of the visible viewport of the editor.

param

The EditorCore object

restoreUndoSnapshot

restoreUndoSnapshot: RestoreUndoSnapshot

Restore an undo snapshot into editor

param

The editor core object

param

Steps to move, can be 0, positive or negative

setContentModel

setContentModel: SetContentModel

Set content with content model

param

The EditorCore object

param

The content model to set

param

Additional options to customize the behavior of Content Model to DOM conversion

setDOMSelection

setDOMSelection: SetDOMSelection

Set current DOM selection from editor. This is the replacement of core API select

param

The EditorCore object

param

The selection to set

param

@param Pass true to skip triggering a SelectionChangedEvent

setEditorStyle

setEditorStyle: SetEditorStyle

Add CSS rules for editor

param

The EditorCore object

param

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.

param

The CSS rule string, must be a valid CSS rule string, or browser may throw exception

param

@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.

setLogicalRoot

setLogicalRoot: SetLogicalRoot

Set a new logical root (most likely due to focus change)

param

The StandaloneEditorCore object

param

The new logical root (has to be child of physicalRoot)

switchShadowEdit

switchShadowEdit: SwitchShadowEdit

Switch the Shadow Edit mode of editor On/Off

param

The EditorCore object

param

True to switch On, False to switch Off

triggerEvent

triggerEvent: TriggerEvent

Trigger a plugin event

param

The EditorCore object

param

The event object to trigger

param

Set to true to skip the shouldHandleEventExclusively check

Generated using TypeDoc