docs: update example
This commit is contained in:
@@ -9,6 +9,12 @@ const MenuBar = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<button
|
||||||
|
onClick={() => editor.chain().focus().toggleBold().run()}
|
||||||
|
className={`${editor.isActive('bold') ? 'is-active' : ''}`}
|
||||||
|
>
|
||||||
|
bold
|
||||||
|
</button>
|
||||||
<button
|
<button
|
||||||
onClick={() => editor.chain().focus().toggleItalic().run()}
|
onClick={() => editor.chain().focus().toggleItalic().run()}
|
||||||
className={`${editor.isActive('italic') ? 'active' : ''}`}
|
className={`${editor.isActive('italic') ? 'active' : ''}`}
|
||||||
@@ -111,12 +117,6 @@ const MenuBar = () => {
|
|||||||
<button onClick={() => editor.chain().focus().redo().run()}>
|
<button onClick={() => editor.chain().focus().redo().run()}>
|
||||||
redo
|
redo
|
||||||
</button>
|
</button>
|
||||||
<button
|
|
||||||
onClick={() => editor.chain().focus().toggleBold().run()}
|
|
||||||
className={`${editor.isActive('bold') ? 'is-active' : ''}`}
|
|
||||||
>
|
|
||||||
bold
|
|
||||||
</button>
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user