mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-01-18 05:59:13 +01:00
docs: Add sections to Text documentation
This commit is contained in:
parent
ba865015cf
commit
861505ab65
@ -11,6 +11,21 @@ interface Text {
|
||||
|
||||
## Static methods
|
||||
|
||||
- [Retrieval methods](#retrieval-methods)
|
||||
- [Check methods](#check-methods)
|
||||
|
||||
### Retrieval methods
|
||||
|
||||
###### `Text.matches(text: Text, props: Partial<Text>): boolean`
|
||||
|
||||
Check if a `text` matches a set of `props`.
|
||||
|
||||
###### `Text.decorations(node: Text, decorations: Range[]): Text[]`
|
||||
|
||||
Get the leaves for a text node, given `decorations`.
|
||||
|
||||
### Check methods
|
||||
|
||||
###### `Text.equals(text: Text, another: Text, options?): boolean`
|
||||
|
||||
Check if two text nodes are equal.
|
||||
@ -20,11 +35,3 @@ Options: `{loose?: boolean}`
|
||||
###### `Text.isText(value: any): value is Text`
|
||||
|
||||
Check if a `value` implements the `Text` interface.
|
||||
|
||||
###### `Text.matches(text: Text, props: Partial<Text>): boolean`
|
||||
|
||||
Check if a `text` matches a set of `props`.
|
||||
|
||||
###### `Text.decorations(node: Text, decorations: Range[]): Text[]`
|
||||
|
||||
Get the leaves for a text node, given `decorations`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user