refactor table options

This commit is contained in:
Hans Pagel
2021-01-22 23:45:50 +01:00
parent aef9d1ca41
commit 64ba3fd212
4 changed files with 43 additions and 43 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div v-if="editor">
<button @click="editor.chain().focus().createTable({ rows: 3, cols: 3, withHeaderRow: true }).run()">
createTable
<button @click="editor.chain().focus().insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run()">
insertTable
</button>
<button @click="editor.chain().focus().addColumnBefore().run()">
addColumnBefore
@@ -39,14 +39,20 @@
<button @click="editor.chain().focus().toggleHeaderCell().run()">
toggleHeaderCell
</button>
<button @click="editor.chain().focus().mergeOrSplit().run()">
mergeOrSplit
</button>
<button @click="editor.chain().focus().setCellAttributes({name: 'color', value: 'pink'}).run()">
setCellAttributes
</button>
<button @click="editor.chain().focus().fixTables().run()">
fixTables
</button>
<button disabled>
toggleCellMerge
<button @click="editor.chain().focus().goToNextCell().run()">
goToNextCell
</button>
<button @click="editor.chain().focus().setCellAttributes({name: 'color', value: 'pink'}).run()">
setCellAttributes (currently single cells only)
<button @click="editor.chain().focus().goToPreviousCell().run()">
goToPreviousCell
</button>
<editor-content :editor="editor" />
</div>