inital commit
This commit is contained in:
27
src/extensions/CustomTableCell.js
Normal file
27
src/extensions/CustomTableCell.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import { TableCell as TableCellOriginal } from '@tiptap/extension-table-cell';
|
||||
|
||||
export const CustomTableCell = TableCellOriginal.extend({
|
||||
content: 'inline*',
|
||||
parseHTML() {
|
||||
return [
|
||||
{ tag: 'td' },
|
||||
];
|
||||
},
|
||||
renderHTML({ HTMLAttributes }) {
|
||||
return ['td', HTMLAttributes, 0];
|
||||
},
|
||||
});
|
||||
|
||||
import { TableHeader as TableHeaderOriginal } from '@tiptap/extension-table-header';
|
||||
|
||||
export const CustomTableHeader = TableHeaderOriginal.extend({
|
||||
content: 'inline*',
|
||||
parseHTML() {
|
||||
return [
|
||||
{ tag: 'th' },
|
||||
];
|
||||
},
|
||||
renderHTML({ HTMLAttributes }) {
|
||||
return ['th', HTMLAttributes, 0];
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user