TLDR: Remirror adopts Prosemirror TypeScript support.
Introducing Remirror v2 π
π§ Why?β
Remirror stands on the shoulders of giants, most notably Prosemirror itself. We therefore want our community to timely benefit whenever one of these great projects adds new features, bug fixes, and the like.
Recently, Prosemirror released native Typescript support. In itself this is awesome news. Unfortunately the types differ from the ones from DefinitelyTyped, which underlay many of Remirror's types. This means that we must update our types to not get stuck on an old Prosemirror version.
The bottom line is: Prosemirror basically forced our hand to release a new major version rather soon. Be that as it may, we want to make the most out of this situation! It allows us to move forward some other breaking changes that help the project.
β¨ What's new?β
First, we removed deprecated features for good:
- useEvents (plural)
- CSS highlight style for text selection. The default browserβs config is more natural, especially in specific edge cases.
Second, we clarified the naming of API methods:
- Rename useEvent to useEditorEvent to avoid confusion with the proposed React hook of the same name.
- Standardize useEditorEvent handlers to have the pattern (event, meta) => boolean (this affects context menu and hover events).
Third, we took on the #1 feedback from the community and revamped the pre-packaged components. The toolbar, buttons, etc. are now based on the more common MUI framework (instead of the former Reakit) and avoid any Remirror-specific infrastructure. This simplifies taking the pre-packaged components and adjusting them to your needs incrementally.
β¬οΈ How to migrate?β
Please consult the migration guide and reach out on Discord if you run into any issues.
π A big thank you to all contributors and earlier testers who made the new major release possible!