fix: rename key to pluginKey for menus
This commit is contained in:
@@ -4,7 +4,7 @@ import { EditorView } from 'prosemirror-view'
|
||||
import tippy, { Instance, Props } from 'tippy.js'
|
||||
|
||||
export interface FloatingMenuPluginProps {
|
||||
key: PluginKey | string,
|
||||
pluginKey: PluginKey | string,
|
||||
editor: Editor,
|
||||
element: HTMLElement,
|
||||
tippyOptions?: Partial<Props>,
|
||||
@@ -160,9 +160,9 @@ export class FloatingMenuView {
|
||||
|
||||
export const FloatingMenuPlugin = (options: FloatingMenuPluginProps) => {
|
||||
return new Plugin({
|
||||
key: typeof options.key === 'string'
|
||||
? new PluginKey(options.key)
|
||||
: options.key,
|
||||
key: typeof options.pluginKey === 'string'
|
||||
? new PluginKey(options.pluginKey)
|
||||
: options.pluginKey,
|
||||
view: view => new FloatingMenuView({ view, ...options }),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user