docs: update example

This commit is contained in:
Hans Pagel
2021-02-26 22:43:32 +01:00
parent 792d1aa8c7
commit a05d40cfec

View File

@@ -9,6 +9,12 @@ const MenuBar = () => {
return (
<>
<button
onClick={() => editor.chain().focus().toggleBold().run()}
className={`${editor.isActive('bold') ? 'is-active' : ''}`}
>
bold
</button>
<button
onClick={() => editor.chain().focus().toggleItalic().run()}
className={`${editor.isActive('italic') ? 'active' : ''}`}
@@ -111,12 +117,6 @@ const MenuBar = () => {
<button onClick={() => editor.chain().focus().redo().run()}>
redo
</button>
<button
onClick={() => editor.chain().focus().toggleBold().run()}
className={`${editor.isActive('bold') ? 'is-active' : ''}`}
>
bold
</button>
</>
)
}