add basic new chaining
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<editor-content :editor="editor" />
|
||||
<div>
|
||||
<button @click="() => console.log(editor.focus())">focus</button>
|
||||
<button @click="() => console.log(editor.insertText('hello'))">insert</button>
|
||||
<button @click="editor.chain().focus().insertText('wat').insertHTML('<p>2</p>').run()">chain</button>
|
||||
<button @click="editor.chain().insertText('1').focus().run()">chain</button>
|
||||
<editor-content :editor="editor" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -16,6 +22,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
editor: null,
|
||||
console: console,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user