packages/website/content/docs/upgrading-to-2-0.mdx
Quill has been significantly modernized. Leveraging the latest browser-supported APIs, Quill now delivers a more efficient and reliable editing experience.
The Quill repository has been rewritten in TypeScript, providing an official TypeScript definition file.
@types/quill installed, uninstall it, as it is no longer neededstrict removed
Previously some changes that were small in practice (renames) but would warrant a semver major bump would be hidden under this configuration. This ended up being more confusing than helpful as we will no longer make use of this.
registry - added to allow multiple editors with different formats to coexist on the same page. Learn more.
scrollingContainer removed
Quill will now automatically detect the scrollable ancestor, eliminating the need to provide this option. This new behavior is more robust and works seamlessly with nested scrollable elements.
convert - API changed to include both HTML and text and previous functionality is broken into multiple method calls (convert, onCapturePaste) to allow more surface to hook into.onCapturePaste - AddedmatchVisual removed - Previously there was a choice between using visual or semantic interpretation of pasted whitespace; now just the semantic interpretation is used. Visual matching was expensive, requiring the DOM renderer which is no longer available in the new clipboard rewrite.pasteHTML removed - Deprecated alias to dangerouslyPasteHTML.key is no longer case insensitive. To support bindings like key: '@', modifiers are taken into account so the shift modifier will affect case sensitivity.key now supports an array of keys to easily bind to multiple shortcuts.All lists use <ol> instead of both <ul> and <ol> allowing better nesting between the two. Copied content will generate the correct semantic markup for paste into other applications.
Code block markup now uses <div> to better support syntax highlighting.
Static register method added to allow dependent chains of registration.
Static formats method now passes in scroll.
Blot constructor now requires scroll to be passed in.
Attributors are exported as top-level classes.
Instead of accessing class attributor via Parchment.Attributor.Class, you now use it at Parchment.ClassAttributor.
Similarly, Parchment.Attributor.Style is now Parchment.StyleAttributor, and Parchment.Attributor.Attribute is now Parchment.Attributor.
Exports are using full names.
Instead of Parchment.Scroll, you now use Parchment.ScrollBlot. The similar change applies to Parchment.Embed, Parchment.Text, Parchment.Block, Parchment.Inline, and more.