API
Node Types
Text
4 min
text objects represent the nodes that contain 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 interface text { text string } docid kiurpjvhnkpymz73 fjs docid kiurpjvhnkpymz73 fjs docid kiurpjvhnkpymz73 fjs static methods retrieval methods text matches(text text, props partial\<text>) => boolean check if a text matches a set of props text decorations(node text, decorations range\[]) => text\[] get the leaves for a text node, given decorations check methods text equals(text text, another text, options?) => boolean check if two text nodes are equal options {loose? boolean} text istext(value any) => value is text check if a value implements the text interface
