add keyboardShortcut and enter command
This commit is contained in:
@@ -1,21 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="editor">
|
||||
<button
|
||||
@click="editor
|
||||
.can()
|
||||
.chain()
|
||||
.focus()
|
||||
.enter()
|
||||
.insertText('1')
|
||||
.enter()
|
||||
.insertText('2')
|
||||
.enter()
|
||||
.insertText('3')
|
||||
.run()"
|
||||
>
|
||||
enter
|
||||
</button>
|
||||
<button @click="editor.chain().focus().toggleBold().run()" :class="{ 'is-active': editor.isActive('bold') }">
|
||||
bold
|
||||
</button>
|
||||
|
||||
@@ -177,7 +177,9 @@ Have a look at all of the core commands listed below. They should give you a goo
|
||||
| .blur() | Removes focus from the editor. |
|
||||
| .deleteRange() | Delete a given range. |
|
||||
| .deleteSelection() | Delete the selection, if there is one. |
|
||||
| .enter() | Trigger enter. |
|
||||
| .focus() | Focus the editor at the given position. |
|
||||
| .keyboardShortcut() | Trigger a keyboard shortcut. |
|
||||
| .scrollIntoView() | Scroll the selection into view. |
|
||||
| .selectAll() | Select the whole document. |
|
||||
| .selectNodeBackward() | Select a node backward. |
|
||||
|
||||
Reference in New Issue
Block a user