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