1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-31 19:01:54 +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

@@ -81,7 +81,7 @@ const App = () => {
// When "B" is pressed, add a bold mark to the text.
case 'b': {
event.preventDefault()
Editor.addMarks(editor, [{ type: 'bold' }])
Editor.addMarks(editor, { type: 'bold' })
break
}
}
@@ -154,7 +154,7 @@ const App = () => {
case 'b': {
event.preventDefault()
Editor.addMarks(editor, [{ type: 'bold' }])
Editor.addMarks(editor, { type: 'bold' })
break
}
}

View File

@@ -55,7 +55,7 @@ const App = () => {
case 'b': {
event.preventDefault()
Editor.addMarks(editor, [{ type: 'bold' }])
Editor.addMarks(editor, { type: 'bold' })
break
}
}