1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-09-02 19:52:32 +02:00

feat: allow MarkTransforms methods to take a single mark (resolve #3175) (#3183)

This commit is contained in:
Wee
2019-12-02 02:49:29 +08:00
committed by Ian Storm Taylor
parent d99629517d
commit 434ce21cec
31 changed files with 69 additions and 58 deletions

View File

@@ -111,7 +111,7 @@ Editor.insertNodes(editor, [element], { at: path })
Editor.splitNodes(editor, { at: point })
// Add a mark to all the text in a range.
Editor.addMarks(editor, [mark], { at: range })
Editor.addMarks(editor, mark, { at: range })
```
The editor-specific helpers are the ones you'll use most often when working with Slate editors, so it pays to become very familiar with them.