add basic enter command

This commit is contained in:
Philipp Kühn
2021-02-09 10:06:13 +01:00
parent 2bd3033207
commit e8232dd737
4 changed files with 81 additions and 0 deletions

View File

@@ -1,6 +1,21 @@
<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>