mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-20 06:01:24 +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
|
```js
|
||||||
Text({
|
Text({
|
||||||
key: String,
|
key: String,
|
||||||
|
text: String,
|
||||||
|
marks: Immutable.List<Mark>,
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -20,20 +22,24 @@ Text({
|
|||||||
|
|
||||||
A unique identifier for the node.
|
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`
|
### `object`
|
||||||
|
|
||||||
`String`
|
`String`
|
||||||
|
|
||||||
An immutable string value of `'text'` for easily separating this node from [`Inline`](./inline.md) or [`Block`](./block.md) nodes.
|
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
|
## Static Methods
|
||||||
|
|
||||||
### `Text.create`
|
### `Text.create`
|
||||||
|
Reference in New Issue
Block a user