docs/api/slate/text.mdx
A Text node contains the actual text content of a Plate 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
}
TextApidecorationsequalsisTextisTextListisTextPropsmatchesTTextText is a type alias for TText.
TextEntryText entries represent a Text node and its path.
<API name="TextEntry"> <APIAttributes> <APIItem name="0" type="TText"> The Text node. </APIItem> <APIItem name="1" type="Path"> The path to the text node. </APIItem> </APIAttributes> </API>DecoratedRangeA 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.
<API name="TextOf"> <APIParameters> <APIItem name="N" type="TNode"> The root node type to extract text types from. </APIItem> </APIParameters> </API>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.
<API name="MarksOf"> <APIParameters> <APIItem name="N" type="TNode"> The root node type to extract mark types from. </APIItem> </APIParameters> </API>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.
<API name="MarkKeysOf"> <APIParameters> <APIItem name="N" type="TNode"> The node type to extract mark keys from. </APIItem> </APIParameters> </API>