upgrading-to-2-0.mdx 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ---
  2. title: Upgrading to 2.0
  3. ---
  4. In progress
  5. ## Quill
  6. - `strict` *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.
  7. - `registry` - added to allow multiple editors with different formats to coexist on the same page.
  8. - `formats` *removed* - `registry` is now strictly more powerful and safer.
  9. ## Clipboard
  10. - `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.
  11. - `onCapturePaste` - Added
  12. ### Configuration
  13. - `matchVisual` *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.
  14. - `pasteHTML` *removed* - Deprecated alias to `dangerouslyPasteHTML`.
  15. ## Keyboard
  16. - Binding `key` is no longer case insensitive. To support bindings like `key: '@'`, modifiers are taken into account so the shift modifier will affect case sensitivity.
  17. - Binding `key` now supports an array of keys to easily bind to multiple shortcuts.
  18. - Native keyboard event object is now also passed into handlers.
  19. ## Parchment
  20. - 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.
  21. - Code block markup now uses `<div>` to better support syntax highlighting.
  22. - Static `register` method added to allow dependent chains of registration.
  23. - Static `formats` method now passes in `scroll`.
  24. - Blot constructor now requires `scroll` to be passed in.
  25. ## Delta
  26. - Support for the deprecated delta format, where embeds had integer values and list attributes had different keys, is now removed
  27. ## Browser
  28. - Quill builds now use `babel-env` to determine the right level of transpiling and polyfilling.
  29. - IE11 support is dropped build size reduced ~25% as a result.