mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-21 22:45:18 +02:00
Swap remove_mark/add_mark example (#3349)
This commit is contained in:
committed by
Ian Storm Taylor
parent
af7a7e7c45
commit
0e4917f49b
@@ -23,9 +23,9 @@ Now you would write:
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
if (isActive) {
|
if (isActive) {
|
||||||
editor.exec({ type: 'add_mark', key: 'bold', value: true })
|
|
||||||
} else {
|
|
||||||
editor.exec({ type: 'remove_mark', key: 'bold' })
|
editor.exec({ type: 'remove_mark', key: 'bold' })
|
||||||
|
} else {
|
||||||
|
editor.exec({ type: 'add_mark', key: 'bold', value: true })
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user