1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-19 13:41:19 +02:00

Text documentation update (#2758)

`text` property is no longer computed. Add `marks` field.
This commit is contained in:
Dan Schuman
2019-05-10 10:47:58 -07:00
committed by Ian Storm Taylor
parent 5bef253855
commit 376015df6c

View File

@@ -11,6 +11,8 @@ A text node in a Slate [`Document`](./document.md). Text nodes are always the bo
```js
Text({
key: String,
text: String,
marks: Immutable.List<Mark>,
})
```
@@ -20,20 +22,24 @@ Text({
A unique identifier for the node.
### `text`
`String`
The text contents of this node.
### `marks`
`Immutable.List<Mark>,`
A list of marks for this node.
### `object`
`String`
An immutable string value of `'text'` for easily separating this node from [`Inline`](./inline.md) or [`Block`](./block.md) nodes.
## Computed Properties
### `text`
`String`
A concatenated string of all of the characters in the text node.
## Static Methods
### `Text.create`