tiptap/packages
Tomas Valenta e9465ec0f6
fix: Add editor dependency when registering BubbleMenuPlugin and FloatingMenuPlugin (#2018)
* Add `editor` dependency when registering `BubbleMenuPlugin`

When we are initializing editor via the `useEditor` hook with dependencies the `BubbleMenu` component is only registered the first time the editor is initialized.

Adding editor to the dependency array registering/unregistering the `BubbleMenuPlugin` fixes this. (I tested exactly this code in our project.)

I also added a check that ensures that the menu element referenced via the `useRef` is defined when registering the plugin - otherwise, there is no point in registering the plugin.

* Add `editor` dependency when registering `FloatingMenuPlugin`
2021-10-12 11:09:00 +02:00
..
core Publish 2021-10-10 22:24:18 +02:00
extension-blockquote Publish 2021-10-10 21:35:11 +02:00
extension-bold Publish 2021-10-10 21:35:11 +02:00
extension-bubble-menu Publish 2021-10-08 15:08:08 +02:00
extension-bullet-list Publish 2021-10-08 15:08:08 +02:00
extension-character-count Publish 2021-07-26 11:42:13 +02:00
extension-code Publish 2021-10-10 21:35:11 +02:00
extension-code-block fix: add support for pasted content from VS Code, fix #2022 2021-10-12 10:20:13 +02:00
extension-code-block-lowlight Publish 2021-10-08 15:08:08 +02:00
extension-collaboration Publish 2021-10-08 15:08:08 +02:00
extension-collaboration-cursor Publish 2021-10-08 15:08:08 +02:00
extension-color Publish 2021-09-08 23:56:15 +02:00
extension-document Publish 2021-07-26 11:42:13 +02:00
extension-dropcursor Publish 2021-08-26 14:12:10 +02:00
extension-floating-menu Publish 2021-10-08 15:08:08 +02:00
extension-focus Publish 2021-10-08 15:08:08 +02:00
extension-font-family Publish 2021-09-08 23:56:15 +02:00
extension-gapcursor Publish 2021-10-08 15:08:08 +02:00
extension-hard-break Publish 2021-10-08 15:08:08 +02:00
extension-heading Publish 2021-10-08 15:08:08 +02:00
extension-highlight Publish 2021-10-10 21:35:11 +02:00
extension-history Publish 2021-08-20 21:15:31 +02:00
extension-horizontal-rule Publish 2021-10-08 15:08:08 +02:00
extension-image Publish 2021-10-11 20:50:55 +02:00
extension-italic Publish 2021-10-10 21:35:11 +02:00
extension-link Publish 2021-10-08 15:08:08 +02:00
extension-list-item Publish 2021-07-26 11:42:13 +02:00
extension-mention Publish 2021-10-08 15:08:08 +02:00
extension-ordered-list Publish 2021-10-08 15:08:08 +02:00
extension-paragraph Publish 2021-08-11 14:40:00 +02:00
extension-placeholder Publish 2021-10-08 15:08:08 +02:00
extension-strike Publish 2021-10-10 21:35:11 +02:00
extension-subscript Publish 2021-07-26 11:42:13 +02:00
extension-superscript Publish 2021-07-26 11:42:13 +02:00
extension-table Publish 2021-10-08 15:08:08 +02:00
extension-table-cell Publish 2021-09-08 23:56:15 +02:00
extension-table-header Publish 2021-09-08 23:56:15 +02:00
extension-table-row Publish 2021-07-26 11:42:13 +02:00
extension-task-item Publish 2021-10-08 15:08:08 +02:00
extension-task-list Publish 2021-07-26 11:42:13 +02:00
extension-text Publish 2021-07-26 11:42:13 +02:00
extension-text-align Publish 2021-09-08 23:56:15 +02:00
extension-text-style Publish 2021-07-26 11:42:13 +02:00
extension-typography Publish 2021-10-08 15:08:08 +02:00
extension-underline Publish 2021-07-26 11:42:13 +02:00
html Publish 2021-10-10 22:24:18 +02:00
react fix: Add editor dependency when registering BubbleMenuPlugin and FloatingMenuPlugin (#2018) 2021-10-12 11:09:00 +02:00
starter-kit Publish 2021-10-10 22:24:18 +02:00
suggestion Publish 2021-10-08 15:08:08 +02:00
vue-2 Publish 2021-10-08 15:08:08 +02:00
vue-3 Publish 2021-10-08 15:08:08 +02:00