mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-24 01:02:31 +01:00
1.0 KiB
1.0 KiB
Document
import { Document } from 'slate'
The top-level node in Slate.
Documents are made up of block nodes, inline nodes, and text nodes—just like in the DOM.
Properties
Document({
nodes: Immutable.List,
})
nodes
Immutable.List
A list of child nodes.
Computed Properties
kind
String
An immutable string value of 'document'
for easily separating this node from Block
, Inline
or Text
nodes.
length
Number
The sum of the lengths of all of the descendant Text
nodes of this node.
text
String
A concatenated string of all of the descendant Text
nodes of this node.
Node Methods
Documents implement the Node
interface. For information about their methods, see the Node
reference.