mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-28 17:39:57 +02:00
docs: Organize Element docs into sections
This commit is contained in:
@@ -11,6 +11,14 @@ interface Element {
|
|||||||
|
|
||||||
## Static methods
|
## Static methods
|
||||||
|
|
||||||
|
### Retrieval methods
|
||||||
|
|
||||||
|
###### `Element.matches(element: Element, props: Partial<Element>): boolean`
|
||||||
|
|
||||||
|
Check if an element matches a set of `props`. Note: This checks custom properties, but it does not ensure that any children are equivalent.
|
||||||
|
|
||||||
|
### Check methods
|
||||||
|
|
||||||
###### `Element.isElement(value: any): value is Element`
|
###### `Element.isElement(value: any): value is Element`
|
||||||
|
|
||||||
Check if a `value` implements the `Element` interface.
|
Check if a `value` implements the `Element` interface.
|
||||||
@@ -18,7 +26,3 @@ Check if a `value` implements the `Element` interface.
|
|||||||
###### `Element.isElementList(value: any): value is Element[]`
|
###### `Element.isElementList(value: any): value is Element[]`
|
||||||
|
|
||||||
Check if a `value` is an array of `Element` objects.
|
Check if a `value` is an array of `Element` objects.
|
||||||
|
|
||||||
###### `Element.matches(element: Element, props: Partial<Element>): boolean`
|
|
||||||
|
|
||||||
Check if an element matches a set of `props`. Note: This checks custom properties, but it does not ensure that any children are equivalent.
|
|
||||||
|
Reference in New Issue
Block a user