Check if the user is currently composing inside the editor.
Check if the editor is focused.
Check if the editor is in read-only mode.
Check if the user is currently composing inside the editor from the DOM bridge.
Check if the DOM editor is focused.
Check if the DOM editor is in read-only mode.
Blur the editor.
Focus the editor.
Clear the native DOM selection and the Plite selection.
Return the mounted editor root element.
Return the mounted editable element for a Plite root.
Return the element used as the editor scroll container. It falls back to the editor root when no custom scroll element is registered.
Find a key for a Plite node.
Resolve the current path of a Plite node. Returns null when the node is not
mounted in the current editor value.
Assert the current path of a Plite node.
Check if a DOM node is within the editor.
Check if the target is editable and in the editor.
Check if the target can be selected by the editor.
Check if the target is in the editor.
Assert the native DOM element for a Plite node.
Resolve the native DOM element for a Plite node or its live NodeKey. Returns
null when the node is not mounted or the key is removed or belongs to another
editor.
Assert a native DOM selection point from a Plite point.
Resolve a native DOM selection point from a Plite point. Returns null when the
Plite point is not currently mappable.
Assert a native DOM range from a Plite range.
Resolve a native DOM range from a Plite range. Returns null when the Plite
range is not currently mappable.
Resolve the bounding rect for a Plite range. Returns null when the range is
not currently mappable to mounted DOM.
editor.api.dom.resolveVisualPoint(point: Point, options: { affinity?: SelectionAssociation; direction: 'left' | 'right'; unit: 'character' | 'word' }): DOMVisualPoint | nullResolve one physical horizontal caret step through the mounted browser layout.
The result carries both the next model point and its affinity. Returns null
when the point is not mounted or the browser cannot resolve the step.
editor.api.dom.scrollIntoView(target: Point | Range | DOMRange, options?: ScrollIntoViewOptions): voidScroll a Plite point, Plite range, or native DOM range into view. The DOM bridge uses the target range rect, so caret scrolling follows the actual selection position inside a text leaf.
Assert a Plite node from a native DOM node.
Resolve a Plite node from a native DOM node. Returns null when the DOM node is
not owned by the editor.
Assert the target range from a DOM event.
Resolve the target range from a DOM event. Returns null when the event target
cannot be mapped into the editor.
editor.api.dom.assertPlitePoint(domPoint: DOMPoint, options: { exactMatch: boolean; searchDirection?: 'backward' | 'forward' }): PointAssert a Plite point from a DOM point.
editor.api.dom.resolvePlitePoint(domPoint: DOMPoint, options: { exactMatch: boolean; searchDirection?: 'backward' | 'forward' }): Point | nullResolve a Plite point from a DOM point. Returns null when the DOM point is not
currently mappable.
editor.api.dom.assertPliteRange(domRange: DOMRange | DOMStaticRange | DOMSelection, options: { exactMatch: boolean }): RangeAssert a Plite range from a DOM range or selection.
editor.api.dom.resolvePliteRange(domRange: DOMRange | DOMStaticRange | DOMSelection, options: { exactMatch: boolean }): Range | nullResolve a Plite range from a DOM range or selection. Returns null when the DOM
range is not currently mappable.
Return the document or shadow root that owns the editor.
Return the window that owns the editor.
Check whether a Plite range can currently be mapped to DOM.
Check whether a DOM event target is inside a non-read-only void element.
Insert data from a DataTransfer into the editor. Returns true when Plite or
an extension inserts content. The call owns one transaction or joins the active
one; DOM clipboard handlers receive it as transaction.
Plite DOM runs typed clipboardHandler(...) extension contributions first. A handler
that returns true stops the default import path. When no handler claims the
data, Plite DOM tries an internal Plite slice for the editor's configured
clipboardFormatKey, then plain text.
Insert Plite fragment data from a DataTransfer. Returns true when fragment
content was inserted.
Insert plain text data from a DataTransfer. Returns true when text content
was inserted.
editor.api.dom.clipboard.readSlice(data: Pick<DataTransfer, 'getData' | 'types'>): ClipboardSliceReadRead one exact Plite slice. The result distinguishes absent data, invalid MIME
or HTML data, and a valid ContentSlice.
Write the current selection to a DataTransfer.
editor.api.dom.clipboard.writeSlice(data: Pick<DataTransfer, 'getData' | 'setData'>, payload: ClipboardSliceWrite): voidWrite one exact ContentSlice plus optional host MIME formats.
Plite writes plain text, HTML, and an internal Plite fragment payload. The
fragment payload uses application/${clipboardFormatKey} and the HTML fallback
is tagged with the same key, so differently configured editors do not blindly
import each other's internal JSON.
Use Clipboard And Paste for the full
copy, paste, drop, and fitted slice replacement pipeline.