add heading command

This commit is contained in:
Philipp Kühn
2020-04-21 22:36:31 +02:00
parent a057755e42
commit 6b5b30f3fc
4 changed files with 45 additions and 8 deletions

View File

@@ -16,6 +16,12 @@
<button @click="editor.focus().italic()" :class="{ 'is-active': editor.isActive('italic') }">
italic
</button>
<button @click="editor.focus().heading({ level: 1 })" :class="{ 'is-active': editor.isActive('heading', { level: 1 }) }">
h1
</button>
<button @click="editor.focus().heading({ level: 2 })" :class="{ 'is-active': editor.isActive('heading', { level: 2 }) }">
h2
</button>
</div>
<editor-content :editor="editor" />
</div>