API
Node Types

Text

5min
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 } text docid\ p erfdwsjwu93afz215m2text docid\ p erfdwsjwu93afz215m2text docid\ p erfdwsjwu93afz215m2 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
🤔
Have a question?
Our super-smart AI,knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.