tiptap/packages/react
Tomas Valenta 561941d5e0
fix: Remove element.current from useEffect in BubbleMenu and FloatingMenu (#2297)
* Remove `element.current` from `useEffect` dependencies

Changes to the `element.current` don't trigger `useEffect` rerender and shouldn't be used in the dependency array.
One discussion about is this is for example here: https://stackoverflow.com/questions/60476155/is-it-safe-to-use-ref-current-as-useeffects-dependency-when-ref-points-to-a-dom

It's also causing some subtle bugs when mounting and unmounting editors.

* Fix `FloatingMenu` and `BubbleMenu` element references

* Fix linting errors

* Don't register plugin when the editor is already destroyed; Simplify `HTMLElement` reference handling

* Fix lint error
2021-12-22 12:13:36 +01:00
..
src fix: Remove element.current from useEffect in BubbleMenu and FloatingMenu (#2297) 2021-12-22 12:13:36 +01:00
CHANGELOG.md Publish 2021-12-17 09:46:13 +01:00
package.json Publish 2021-12-17 09:46:13 +01:00
README.md docs: fix typo (#1339) 2021-05-18 18:36:18 +02:00
tsconfig.json improve typescript setup 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.