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-09-14 21:46:21 +02:00
2021-10-10 12:36:30 +02:00
2020-09-30 22:43:58 +02:00
2021-07-26 15:36:12 +02:00
2021-02-26 02:40:22 +01:00
2021-09-17 12:43:26 +02:00
2021-03-05 12:41:25 +01:00
2021-04-27 18:50:51 +02:00
2021-10-08 12:13:20 +02:00
2021-10-07 14:48:09 +02:00
2021-09-29 09:06:10 +02:00
2021-09-20 09:32:39 +02:00

tiptap

A headless, framework-agnostic and extendable rich text editor, based on ProseMirror.

Build Status Version Downloads License Chat Sponsor

If youre looking for tiptap 1, click here.

Examples

Have a look at the examples to see tiptap in action.

Documentation

The full documentation is a available on www.tiptap.dev.

Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

Discuss tiptap on GitHub

Sponsors 💖


überdosis

Rimsys

CosmicMind

Complish

Gamma

Storyblok

Reflect

Bitcrowd

Ziff Media

Incyte Studios

restruct

dotCMS

iFixit, @shodgson, Markee Co., Makelog, Zephir, IT Xpert AG, ApostropheCMS, Novadiscovery, Omics Data Automation, Gretel, Flow Mobile, Ycode, DocIQ and hundreds of awesome inviduals.

Using tiptap in production? Invest in the future of tiptap and become a sponsor!

Contributing

Please see CONTRIBUTING for details.

Contributors

Sam Willis, Brian Hung, Dirk Holtwick, Sam Duvall, Christoph Flathmann, Erick Wilder, Marius Tolzmann, jjangga0214, Maya Nedeljkovich, Ryan Bliss, Gregor and many more.

License

The MIT License (MIT). Please see License File for more information.

Description
No description provided
Readme 30 MiB
Languages
TypeScript 98.2%
JavaScript 1.8%