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:
@@ -8,11 +8,13 @@ export type FloatingMenuOptions = Omit<FloatingMenuPluginProps, 'editor' | 'elem
|
||||
export const FloatingMenu = Extension.create<FloatingMenuOptions>({
|
||||
name: 'floatingMenu',
|
||||
|
||||
defaultOptions: {
|
||||
element: null,
|
||||
tippyOptions: {},
|
||||
pluginKey: 'floatingMenu',
|
||||
shouldShow: null,
|
||||
addOptions() {
|
||||
return {
|
||||
element: null,
|
||||
tippyOptions: {},
|
||||
pluginKey: 'floatingMenu',
|
||||
shouldShow: null,
|
||||
}
|
||||
},
|
||||
|
||||
addProseMirrorPlugins() {
|
||||
|
||||
Reference in New Issue
Block a user