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