feat!: Replace defaultOptions with addOptions (#2088)
* add new addOptions option * replace defaultOptions with addOptions for all extensions * replace defaultOptions with addOptions for all demos * replace defaultOptions with addOptions in docs * refactoring * refactoring * drop object support for addOptions * fix optional options * fix tests
This commit is contained in:
@@ -82,16 +82,18 @@ declare module '@tiptap/core' {
|
||||
export const Table = Node.create<TableOptions>({
|
||||
name: 'table',
|
||||
|
||||
defaultOptions: {
|
||||
HTMLAttributes: {},
|
||||
resizable: false,
|
||||
handleWidth: 5,
|
||||
cellMinWidth: 25,
|
||||
// TODO: fix
|
||||
// @ts-ignore
|
||||
View: TableView,
|
||||
lastColumnResizable: true,
|
||||
allowTableNodeSelection: false,
|
||||
// @ts-ignore
|
||||
addOptions() {
|
||||
return {
|
||||
HTMLAttributes: {},
|
||||
resizable: false,
|
||||
handleWidth: 5,
|
||||
cellMinWidth: 25,
|
||||
// TODO: fix
|
||||
View: TableView,
|
||||
lastColumnResizable: true,
|
||||
allowTableNodeSelection: false,
|
||||
}
|
||||
},
|
||||
|
||||
content: 'tableRow+',
|
||||
|
||||
Reference in New Issue
Block a user