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:
@@ -25,9 +25,11 @@ declare module '@tiptap/core' {
|
||||
export const Heading = Node.create<HeadingOptions>({
|
||||
name: 'heading',
|
||||
|
||||
defaultOptions: {
|
||||
levels: [1, 2, 3, 4, 5, 6],
|
||||
HTMLAttributes: {},
|
||||
addOptions() {
|
||||
return {
|
||||
levels: [1, 2, 3, 4, 5, 6],
|
||||
HTMLAttributes: {},
|
||||
}
|
||||
},
|
||||
|
||||
content: 'inline*',
|
||||
|
||||
Reference in New Issue
Block a user