Text
API reference for text nodes in Slate.
A Text node contains the actual text content of a Slate document along with any formatting properties. They are always leaf nodes in the document tree as they cannot contain any children.
type TText = {
text: string
[key: string]: unknown
}
TextApi
decorations
equals
isText
isTextList
isTextProps
matches
Types
TText
Text
is a type alias for TText
.
TextEntry
Text entries represent a Text node and its path.
DecoratedRange
A range object that includes decoration information. Used to apply formatting or styling to specific ranges of text within a document.
TextOf<N>
A utility type that extracts all possible text node types from a root node type.
TextIn<V>
A utility type that extracts all text node types from a Value
type.
MarksOf<N>
A utility type that extracts all possible mark types from a root node type. Marks are the formatting properties that can be applied to text nodes.
MarksIn<V>
A utility type that extracts all mark types from a Value
type. Similar to MarksOf
but works specifically with editor Value
types.
MarkKeysOf<N>
A utility type that extracts all possible mark property keys from a node type.