add attributes to table cells
This commit is contained in:
@@ -4,22 +4,22 @@
|
|||||||
⚠️ createTable
|
⚠️ createTable
|
||||||
</button>
|
</button>
|
||||||
<button @click="editor.chain().focus().addColumnBefore().run()">
|
<button @click="editor.chain().focus().addColumnBefore().run()">
|
||||||
⚠️ addColumnBefore
|
✅ addColumnBefore
|
||||||
</button>
|
</button>
|
||||||
<button @click="editor.chain().focus().addColumnAfter().run()">
|
<button @click="editor.chain().focus().addColumnAfter().run()">
|
||||||
⚠️ addColumnAfter
|
✅ addColumnAfter
|
||||||
</button>
|
</button>
|
||||||
<button @click="editor.chain().focus().deleteColumn().run()">
|
<button @click="editor.chain().focus().deleteColumn().run()">
|
||||||
⚠️ deleteColumn
|
✅ deleteColumn
|
||||||
</button>
|
</button>
|
||||||
<button @click="editor.chain().focus().addRowBefore().run()">
|
<button @click="editor.chain().focus().addRowBefore().run()">
|
||||||
⚠️ addRowBefore
|
✅ addRowBefore
|
||||||
</button>
|
</button>
|
||||||
<button @click="editor.chain().focus().addRowAfter().run()">
|
<button @click="editor.chain().focus().addRowAfter().run()">
|
||||||
⚠️ addRowAfter
|
✅ addRowAfter
|
||||||
</button>
|
</button>
|
||||||
<button @click="editor.chain().focus().deleteRow().run()">
|
<button @click="editor.chain().focus().deleteRow().run()">
|
||||||
⚠️ deleteRow
|
✅ deleteRow
|
||||||
</button>
|
</button>
|
||||||
<button @click="editor.chain().focus().deleteTable().run()">
|
<button @click="editor.chain().focus().deleteTable().run()">
|
||||||
✅ deleteTable
|
✅ deleteTable
|
||||||
|
|||||||
@@ -14,7 +14,19 @@ export const TableCell = Node.create({
|
|||||||
|
|
||||||
content: 'block+',
|
content: 'block+',
|
||||||
|
|
||||||
// attrs: cellAttrs,
|
addAttributes() {
|
||||||
|
return {
|
||||||
|
colspan: {
|
||||||
|
default: 1,
|
||||||
|
},
|
||||||
|
rowspan: {
|
||||||
|
default: 1,
|
||||||
|
},
|
||||||
|
colwidth: {
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
tableRole: 'cell',
|
tableRole: 'cell',
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user