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