Files
tiptap/packages/react
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
..
2021-10-11 20:50:55 +02:00
2021-10-11 20:50:55 +02:00
2021-05-18 18:36:18 +02:00
2021-09-17 12:43:26 +02:00

@tiptap/react

Version Downloads License Sponsor

Introduction

tiptap is a headless wrapper around ProseMirror a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as New York Times, The Guardian or Atlassian.

Official Documentation

Documentation can be found on the tiptap website.

License

tiptap is open sourced software licensed under the MIT license.