add bold button
This commit is contained in:
@@ -6,8 +6,8 @@ export default class Bold extends Mark {
|
||||
name = 'bold'
|
||||
|
||||
created() {
|
||||
this.editor.registerCommand('bold', next => {
|
||||
toggleMark(this.schemaType)
|
||||
this.editor.registerCommand('bold', (next, { view }) => {
|
||||
toggleMark(this.schemaType)(view.state, view.dispatch)
|
||||
next()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
<button @click="editor.redo().focus()">
|
||||
redo
|
||||
</button>
|
||||
<button @click="editor.bold().focus()">
|
||||
bold
|
||||
</button>
|
||||
</div>
|
||||
<editor-content :editor="editor" />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user