Element
Element objects are a type of node in a Slate document that contain other Element nodes or Text nodes.
Element nodes behave differently depending on the Slate editor's configuration. An element can be:
- "block" or "inline" as defined by editor.isInline
- either "void" or "not void" as defined by editor.isVoid
A "block" element can only be siblings with other "block" elements. An "inline" node can be siblings with Text nodes or other "inline" elements.
In a not "void" element, Slate handles the rendering of its children (e.g. in a paragraph where the Text and Inline children are rendered by Slate). In a "void" element, the children are rendered by the Element's render code.
Check if an element matches a set of props. Note: This checks custom properties, but it does not ensure that any children are equivalent.
Check if a value implements the Element interface.
Check if a value is an array of Element objects.