1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-30 10:29:48 +02:00

doc: add missing APIs in the doc (#5835)

* doc: add missing APIs in the doc

* refactor: apply lint
This commit is contained in:
Deepak Kharah
2025-04-04 10:40:34 +05:30
committed by GitHub
parent 8b2414ab16
commit 5adb8ededf
6 changed files with 51 additions and 3 deletions

View File

@@ -246,6 +246,10 @@ Delete the content in the current selection.
Insert a block break at the current selection.
#### `Editor.insertSoftBreak(editor: Editor) => void`
Insert a soft break at the current selection.
#### `Editor.insertFragment(editor: Editor, fragment: Node[], options?) => void`
Inserts a fragment at the specified location or (if not defined) the current selection or (if not defined) the end of the document.
@@ -444,7 +448,7 @@ Remove a custom property from the leaf text nodes within non-void nodes or void
### getFragment method
#### `getFragment() => Descendant`
#### `getFragment() => Descendant[]`
Returns the fragment at the current selection. Used when cutting or copying, as an example, to get the fragment at the current selection.