mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-09-09 22:50:41 +02:00
Add soft break as a separate overridable editor method (#4873)
add changeset
This commit is contained in:
@@ -460,6 +460,10 @@ Insert a fragment at the current selection. If the selection is currently expand
|
||||
|
||||
Insert a block break at the current selection. If the selection is currently expanded, delete it first.
|
||||
|
||||
#### `insertSoftBreak() => void`
|
||||
|
||||
Insert a soft break at the current selection. If the selection is currently expanded, delete it first.
|
||||
|
||||
#### `insertNode(node: Node) => void`
|
||||
|
||||
Insert a node at the current selection. If the selection is currently expanded, delete it first.
|
||||
|
@@ -21,6 +21,7 @@ interface Editor {
|
||||
deleteForward: (unit: 'character' | 'word' | 'line' | 'block') => void
|
||||
deleteFragment: () => void
|
||||
insertBreak: () => void
|
||||
insertSoftBreak: () => void
|
||||
insertFragment: (fragment: Node[]) => void
|
||||
insertNode: (node: Node) => void
|
||||
insertText: (text: string) => void
|
||||
|
Reference in New Issue
Block a user