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:
committed by
Ian Storm Taylor
parent
5bef253855
commit
376015df6c
@@ -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`
|
||||
|
Reference in New Issue
Block a user