Slate React

API reference for @udecode/slate-react.

@udecode/slate-react extends Slate React API with generic types.

React Editor

Find the corresponding documentation in the Slate React docs.

SlateProps

blurEditor

deselectEditor

findEditorDocumentOrShadowRoot

findEventRange

findNodeKey

findNodePath

focusEditor

getEditorWindow

hasEditorDOMNode

hasEditorEditableTarget

hasEditorSelectableTarget

hasEditorTarget

insertData

isComposing

isEditorFocused

isEditorReadOnly

isTargetInsideNonReadonlyVoidEditor

setFragmentData

toDOMNode

toDOMPoint

toDOMRange

toSlateNode

toSlatePoint

toSlateRange

Transforms

focusEditorEdge

Focuses the editor at a specified edge (start or end).

Parameters

Collapse all

    The editor instance.

setNode

Sets properties on a specific node in the editor.

Parameters

Collapse all

    The editor instance.

    The node to update.

    The properties to set on the node.

    Options for setting nodes, excluding the 'at' property.