Text
Last updated
import { Text } from 'slate'A text node in a Slate Document. Text nodes are always the bottom-most leaves in the document, just like in the DOM.
Text({
key: String,
text: String,
marks: Immutable.List<Mark>,
})keyString
A unique identifier for the node.
textString
The text contents of this node.
marksImmutable.Set<Mark>,
A list of marks for this node.
objectString
An immutable string value of 'text' for easily separating this node from Inline or Block nodes.
Text.createText.create(properties: Object) => Text
Create a text from a plain JavaScript object of properties.
Text.fromJSONText.fromJSON(object: Object) => Text
Create a text from a JSON object.
Text.isTextText.isText(maybeText: Any) => Boolean
Returns a boolean if the passed in argument is a Text.
toJSONtoJSON() => Object
Returns a JSON representation of the text.
Last updated