v2.0.0
版本发布时间: 2024-04-17 08:45:31
slab/quill最新发布版本:v2.0.2(2024-05-13 15:39:04)
We are thrilled to announce the release of Quill 2.0! Please check out the announcement post.
Major Improvements
- Quill is now a valid ESM package for better ecosystem (e.g. bundlers) and tree-shaking support
- Nested Quill support #3590
- Improved IME and spell corrector support #3807
- Semantic cleanups for TEXT_CHANGE event #3778
- History: Record selection in history module #3823
- Auto detect scrolling container #3840
- Clipboard: Improve support for pasting from Google Docs and Microsoft Word
Performance Improvements
Quill 2.0 includes many performance optimizations, the most important of which is the improved rendering speed for large content.
- Improve inserting performance #3815
- Avoid fetching selections when possible #3538
- No need to setContents when container is empty #3539
Code Modernization
- Migrated to TypeScript
- Provided official TypeScript declarations
- Migrated to Vitest for unit testing
- Migrated to Playwright for E2E testing
- Migrated website to Gatsby
All Changes
- Improve keyboard docs by @thomsbg in https://github.com/quilljs/quill/pull/2057
- Fixed a very very minor typo on line 102. :) by @parthdesai93 in https://github.com/quilljs/quill/pull/2073
- fix typo by @fengyuanchen in https://github.com/quilljs/quill/pull/2087
- Invalid
}
on line 171 in api/contents.md by @parthdesai93 in https://github.com/quilljs/quill/pull/2108 - Corrected delta displayed in video code block in Medium clone guide by @MicahLyle in https://github.com/quilljs/quill/pull/2122
- Correct typo by @bflatmajor in https://github.com/quilljs/quill/pull/2143
- Fix unmatched braces by @bflatmajor in https://github.com/quilljs/quill/pull/2145
- Fix typo: Draft -> Quill by @1c7 in https://github.com/quilljs/quill/pull/2219
- Update formats.md by @vojtechsebo in https://github.com/quilljs/quill/pull/2223
- Use DOMParser to safely parse html without script execution by @RyanV in https://github.com/quilljs/quill/pull/2226
- bypass uploader if clipboardData has rich text by @RyanV in https://github.com/quilljs/quill/pull/2227
- fix sauce labs + travis for PRs by @jhchen in https://github.com/quilljs/quill/pull/2250
- Generate more accurate deltas from typing by @dgreensp in https://github.com/quilljs/quill/pull/2252
- Prevent code-token attribute in deltas by @dgreensp in https://github.com/quilljs/quill/pull/2259
- Prevent icon-picker from triggering unnecessary layout reflow by @leandrogaspar in https://github.com/quilljs/quill/pull/2269
- fix insert text before block embed by @lixiaoyan in https://github.com/quilljs/quill/pull/2278
- Emit single change when typing enter on empty list line by @jbbakst in https://github.com/quilljs/quill/pull/2279
- Fix invalid URL on the documentation by @sisidovski in https://github.com/quilljs/quill/pull/2301
- Use new quill-delta from SHA by @dgreensp in https://github.com/quilljs/quill/pull/2311
- Fix a typo by @jfix in https://github.com/quilljs/quill/pull/2327
- Remove custom diff logic in favor of improved Delta#diff by @dgreensp in https://github.com/quilljs/quill/pull/2348
- Fix Cursor blot restoration and selection preservation by @dgreensp in https://github.com/quilljs/quill/pull/2354
- Fix tabnabbing vulnerability in Snow theme by @jonathanlloyd in https://github.com/quilljs/quill/pull/2439
- setSelection missing default length values in docs by @philraj in https://github.com/quilljs/quill/pull/2452
- Update cloning-medium-with-parchment.md by @bjenkins24 in https://github.com/quilljs/quill/pull/2457
- clearer language by @philraj in https://github.com/quilljs/quill/pull/2456
- Add link table to dev setup guide by @Percipient24 in https://github.com/quilljs/quill/pull/2491
- Fix collaborative undo correctness (fixes #2105) by @dgreensp in https://github.com/quilljs/quill/pull/2500
- Correctly convert mixed lists by @alecgibson in https://github.com/quilljs/quill/pull/2581
- fix: Inconsistent with code by @tboevil in https://github.com/quilljs/quill/pull/2569
- Move drag blocking to
Scroll
by @alecgibson in https://github.com/quilljs/quill/pull/2596 - Fix direction button in the demo by @benbro in https://github.com/quilljs/quill/pull/2649
- Update delta.md by @unitehenry in https://github.com/quilljs/quill/pull/2675
- Small edits for grammar and readability by @DillonBroadus in https://github.com/quilljs/quill/pull/2710
- fix for https://github.com/quilljs/quill/issues/2585 by @edhowler in https://github.com/quilljs/quill/pull/2682
- Fix tab nabbing vulnerability in formatted links by @d4l-w4r in https://github.com/quilljs/quill/pull/2674
- Unblocks Grammarly by @A-gambit in https://github.com/quilljs/quill/pull/3005
- docs: Fix simple typo, returing -> returning by @timgates42 in https://github.com/quilljs/quill/pull/3003
- Backspace at the header beginning should keep the format by @luin in https://github.com/quilljs/quill/pull/3013
- Fix length mismatch when copying code by @luin in https://github.com/quilljs/quill/pull/3028
- Fix pasting in checklist does not preserve indentation by @luin in https://github.com/quilljs/quill/pull/3064
- Keep list numbers continuous when separated by certain elements by @luin in https://github.com/quilljs/quill/pull/3086
- Handle native undo/redo by @luin in https://github.com/quilljs/quill/pull/3115
- Update keyboard.md by @haqer1 in https://github.com/quilljs/quill/pull/3043
- Ignore mutations happens in nested Quill instance by @luin in https://github.com/quilljs/quill/pull/3223
- Update keyboard.md by @mashuDuek in https://github.com/quilljs/quill/pull/3221
- Header/paragraph doesn't reset list numbering in Firefox by @luin in https://github.com/quilljs/quill/pull/3272
- Cut across lines shouldn't affect the formatting of the line above by @luin in https://github.com/quilljs/quill/pull/3286
- Fix checkbox not checkable on Firefox by @luin in https://github.com/quilljs/quill/pull/3293
- fix extension.md by @ndNovaDev in https://github.com/quilljs/quill/pull/3295
- fix extension.md by @ndNovaDev in https://github.com/quilljs/quill/pull/3294
- Update quickstart.md typo by @gan-h in https://github.com/quilljs/quill/pull/3314
- Fix insert inline embed with delete before block embed by @tzyl in https://github.com/quilljs/quill/pull/2882
- Discontinue inline formats on enter by @luin in https://github.com/quilljs/quill/pull/3428
- getLeaf() should ignore non-leaf blots by @luin in https://github.com/quilljs/quill/pull/3489
- Fix getBounds of empty text nodes by @luin in https://github.com/quilljs/quill/pull/3491
- Other list types should also reset list numbers by @luin in https://github.com/quilljs/quill/pull/3506
- Move code escaping to
html()
by @luin in https://github.com/quilljs/quill/pull/3531 - Keep cursor unlinked to avoid elements being pushed down inside by @luin in https://github.com/quilljs/quill/pull/3534
- Avoid fetching selections when possible by @luin in https://github.com/quilljs/quill/pull/3538
- No need to setContents when container is empty by @luin in https://github.com/quilljs/quill/pull/3539
- Support OT for table by @luin in https://github.com/quilljs/quill/pull/3590
- Issue/3336 repeated style by @Dora1604 in https://github.com/quilljs/quill/pull/3337
- Improve Tab handling in code block by @luin in https://github.com/quilljs/quill/pull/3593
- typo by @joelcarrier in https://github.com/quilljs/quill/pull/3581
- Fix selection-change not firing on DOM mutations by @luin in https://github.com/quilljs/quill/pull/3591
- Initial TypeScript setup by @luin in https://github.com/quilljs/quill/pull/3598
- Migrate remaining files to TypeScript by @luin in https://github.com/quilljs/quill/pull/3631
- TypeScript compatibility improvement by @luin in https://github.com/quilljs/quill/pull/3651
- Fix typo in themes docs by @derrickreimer in https://github.com/quilljs/quill/pull/3477
- Tooling updates by @luin in https://github.com/quilljs/quill/pull/3681
- Keep newlines in pre tag by @luin in https://github.com/quilljs/quill/pull/3687
- Declare module '*.svg' by @SCG82 in https://github.com/quilljs/quill/pull/3656
- Fix clipboard typing by @luin in https://github.com/quilljs/quill/pull/3686
- Use Playwright for E2E tests by @luin in https://github.com/quilljs/quill/pull/3695
- Add missing typing for Quill.find by @luin in https://github.com/quilljs/quill/pull/3705
- Small doc fix by @diegohaz in https://github.com/quilljs/quill/pull/3426
- Fix typo in comparison-with-other-rich-text-editors.md by @eltociear in https://github.com/quilljs/quill/pull/3400
- Add SMS to link protocol whitelist by @anish2690 in https://github.com/quilljs/quill/pull/2851
- Refactor Selection#scrollIntoView() by @luin in https://github.com/quilljs/quill/pull/3717
- 🏷️ Add
@types/lodash.clonedeep
types by @alecgibson in https://github.com/quilljs/quill/pull/3736 - 🏷️ Fix Toolbar
Handler
type by @alecgibson in https://github.com/quilljs/quill/pull/3730 - 🐛 Allow string selector for container by @xavivars in https://github.com/quilljs/quill/pull/3755
- Upgrade quill-delta for semantic cleanups by @luin in https://github.com/quilljs/quill/pull/3778
- Fix applyDelta with block embed by @luin in https://github.com/quilljs/quill/pull/3777
- Lint test files by @luin in https://github.com/quilljs/quill/pull/3782
- Fix embed inherits formats unexpectedly by @luin in https://github.com/quilljs/quill/pull/3783
- 🏷️ Fix
Quill.getText()
arguments by @alecgibson in https://github.com/quilljs/quill/pull/3737 - 🏷️ Fix
Block.moveChildren()
signature by @alecgibson in https://github.com/quilljs/quill/pull/3735 - 🏷️ Fix
Quill.getFormat()
arguments by @alecgibson in https://github.com/quilljs/quill/pull/3731 - 🏷️ Add overload for
Clipboard.dangerouslyPasteHTML()
by @alecgibson in https://github.com/quilljs/quill/pull/3734 - Fix HTML and Delta not matching by @luin in https://github.com/quilljs/quill/pull/3784
- Upgrade TypeScript and Webpack by @luin in https://github.com/quilljs/quill/pull/3787
- 🏷️ Add module
DEFAULTS
types by @alecgibson in https://github.com/quilljs/quill/pull/3733 - Enable strictNullChecks by @luin in https://github.com/quilljs/quill/pull/3791
- Fix inline embed insertions with applyDelta() by @luin in https://github.com/quilljs/quill/pull/3793
- 🐛 Fix inserting newlines into formatted text by @alecgibson in https://github.com/quilljs/quill/pull/3582
- Add a standalone page for performance testing by @luin in https://github.com/quilljs/quill/pull/3788
- 🏷️ Fix TypeScript error by @alecgibson in https://github.com/quilljs/quill/pull/3803
- Upgrade Parchment to fix typings by @luin in https://github.com/quilljs/quill/pull/3805
- Use babel-loader for building by @luin in https://github.com/quilljs/quill/pull/3808
- Handle text replacements explicitly by @luin in https://github.com/quilljs/quill/pull/3807
- 🏷️ Fix
addModule()
types by @alecgibson in https://github.com/quilljs/quill/pull/3814 - 🏷️ Fix
BaseTooltip.edit()
signature by @alecgibson in https://github.com/quilljs/quill/pull/3816 - Introduce fuzzing testing by @luin in https://github.com/quilljs/quill/pull/3789
- Increase timeout for fuzz testing by @luin in https://github.com/quilljs/quill/pull/3818
- Fix fuzz testing running condition by @luin in https://github.com/quilljs/quill/pull/3819
- Refactor composition to allow overriding by @luin in https://github.com/quilljs/quill/pull/3820
- Expose quill for E2E testing by @luin in https://github.com/quilljs/quill/pull/3822
- Improve inserting performance by @luin in https://github.com/quilljs/quill/pull/3815
- Pass source for history actions by @kalys in https://github.com/quilljs/quill/pull/3514
- Compile ts files with a separate config by @luin in https://github.com/quilljs/quill/pull/3824
- Fix block embed attributor errors by @luin in https://github.com/quilljs/quill/pull/3825
- Make sure blot is attached before calling formatAt by @luin in https://github.com/quilljs/quill/pull/3826
- Record selection in history module by @luin in https://github.com/quilljs/quill/pull/3823
- Migrate tests to Vitest by @luin in https://github.com/quilljs/quill/pull/3832
- Fix insertContents for prepending block embeds by @luin in https://github.com/quilljs/quill/pull/3842
- fix: restore focus on cancel by @taozhou-glean in https://github.com/quilljs/quill/pull/3780
- Auto detect scrolling container by @luin in https://github.com/quilljs/quill/pull/3840
- Toolbar: add aria-pressed to toolbar buttons by @cmrd-senya in https://github.com/quilljs/quill/pull/3615
- getHTML() should include outer tag when range is entire line by @luin in https://github.com/quilljs/quill/pull/3850
- Turn on
noImplicitAny
and fix all errors by @bmakuh in https://github.com/quilljs/quill/pull/3845 - Enable verbatimModuleSyntax for project by @luin in https://github.com/quilljs/quill/pull/3854
- Upgrade prettier and enforce styles by @luin in https://github.com/quilljs/quill/pull/3855
- fix styling for bubble tooltip close by @fstrelczuk in https://github.com/quilljs/quill/pull/3609
- Add aria labels to toolbar by @luin in https://github.com/quilljs/quill/pull/3861
- Add role to toolbar by @luin in https://github.com/quilljs/quill/pull/3862
- Update landing page to use const instead of var in the example by @dlitsman in https://github.com/quilljs/quill/pull/3877
- Fix list IME support in Safari by @luin in https://github.com/quilljs/quill/pull/3875
- Update docs and guides to use const vs var by @dlitsman in https://github.com/quilljs/quill/pull/3876
- Fix indent not working by @fnlctrl in https://github.com/quilljs/quill/pull/3899
- Ignore JS files in nested folder by @luin in https://github.com/quilljs/quill/pull/3900
- Normalize UI node selection by @luin in https://github.com/quilljs/quill/pull/3898
- Handle multiple navigation shortcuts by @luin in https://github.com/quilljs/quill/pull/3911
- Refactor: switch to lodash-es by @fnlctrl in https://github.com/quilljs/quill/pull/3910
- Migrate to a monorepo by @luin in https://github.com/quilljs/quill/pull/3913
- Update package.json fields by @luin in https://github.com/quilljs/quill/pull/3921
- Release 2.0 Beta by @luin in https://github.com/quilljs/quill/pull/3901
- Improvements for Quill website by @luin in https://github.com/quilljs/quill/pull/3923
- Fix docs typo by @luin in https://github.com/quilljs/quill/pull/3924
- Update Prism usage for website by @luin in https://github.com/quilljs/quill/pull/3946
- Migrate to GA 4 by @luin in https://github.com/quilljs/quill/pull/3947
- Fix typing errors for emitter by @luin in https://github.com/quilljs/quill/pull/3948
- Inline SVG images for easier bundler setup by @luin in https://github.com/quilljs/quill/pull/3950
- Update release script by @luin in https://github.com/quilljs/quill/pull/3951
- Support dry-run and experimental versions by @luin in https://github.com/quilljs/quill/pull/3955
- Improve typings for attributor by @luin in https://github.com/quilljs/quill/pull/3954
- Upgrade Parchment by @luin in https://github.com/quilljs/quill/pull/3956
- Update README for 2.0 usages by @luin in https://github.com/quilljs/quill/pull/3960
- Update quick start documentation by @luin in https://github.com/quilljs/quill/pull/3961
- Tweak website content by @luin in https://github.com/quilljs/quill/pull/3963
- Website improvements for 2.0 by @luin in https://github.com/quilljs/quill/pull/3964
- Update local development guide by @luin in https://github.com/quilljs/quill/pull/3965
- Add migration guide for 2.0 by @luin in https://github.com/quilljs/quill/pull/3966
- Implement version dropdown by @luin in https://github.com/quilljs/quill/pull/3967
- Enable SSL for dev env by @luin in https://github.com/quilljs/quill/pull/3971
- Fix IME not working correctly in Safari by @luin in https://github.com/quilljs/quill/pull/3972
- Support paste and match style by @fnlctrl in https://github.com/quilljs/quill/pull/3927
- Fix Quill.getText not respecting length by @luin in https://github.com/quilljs/quill/pull/3979
- Fix redo shortcut not working on Linux and Windows by @luin in https://github.com/quilljs/quill/pull/3980
- Convert newlines between inline elements to a space by @luin in https://github.com/quilljs/quill/pull/3983
- Support highlight.js 10 and 11 by @luin in https://github.com/quilljs/quill/pull/3985
- Avoid generating unsupported formats on paste by @luin in https://github.com/quilljs/quill/pull/3988
- Improve support for pasting from Google Docs and Microsoft Word by @luin in https://github.com/quilljs/quill/pull/3989
- Ignore whitespace between pasted empty paragraphs by @luin in https://github.com/quilljs/quill/pull/3990
- Add link, image, video, formula to the formats array example by @benbro in https://github.com/quilljs/quill/pull/3991
- Add { 'list': 'check' } to the formats array example by @benbro in https://github.com/quilljs/quill/pull/3993
- Merge develop branch to main by @luin in https://github.com/quilljs/quill/pull/3994
- Change default branch by @luin in https://github.com/quilljs/quill/pull/3995
- Fix documentation link by @N-M in https://github.com/quilljs/quill/pull/3998
- Remove unnecessary lodash usages by @luin in https://github.com/quilljs/quill/pull/4004
- Add clipboard test cases for plain text by @luin in https://github.com/quilljs/quill/pull/4005
- Merge from develop branch by @luin in https://github.com/quilljs/quill/pull/4009
- 🐛 Fix Selection.getBounds() when starting range at end of text node by @luin in https://github.com/quilljs/quill/pull/4010
- Update playground for website by @luin in https://github.com/quilljs/quill/pull/4011
- Add an example for using Quill with React by @luin in https://github.com/quilljs/quill/pull/4012
- Preserve es modules in babel config by @fnlctrl in https://github.com/quilljs/quill/pull/4013
- Fix getSemanticHTML for list items by @luin in https://github.com/quilljs/quill/pull/4016
- Fix example for content and delta in playground by @JayaKrishnaNamburu in https://github.com/quilljs/quill/pull/4020
- Remove unnecessary Firefox workaround by @luin in https://github.com/quilljs/quill/pull/4028
- Make Quill an ESM package by @luin in https://github.com/quilljs/quill/pull/4047
- Fix redundant newlines when pasting from external sources by @luin in https://github.com/quilljs/quill/pull/4050
- Make option parsing type safe by @luin in https://github.com/quilljs/quill/pull/4052
- Upgrade Parchment for better typings by @luin in https://github.com/quilljs/quill/pull/4055
- Upgrade TypeScript by @luin in https://github.com/quilljs/quill/pull/4056
- Add formats option for specifying allowed formats by @luin in https://github.com/quilljs/quill/pull/4053
- Include source maps for Parchment by @luin in https://github.com/quilljs/quill/pull/4057
- Support pasting links copied from iOS share sheets by @luin in https://github.com/quilljs/quill/pull/4064
- Fix config parsing where undefined values were kept by @luin in https://github.com/quilljs/quill/pull/4068
- Upgrade to Parchment RC by @luin in https://github.com/quilljs/quill/pull/4069
- Expose types for Quill options by @luin in https://github.com/quilljs/quill/pull/4075
- Remove empty .css.js files generated by bundlers by @luin in https://github.com/quilljs/quill/pull/4076
- Fix function overloads for formatText by @luin in https://github.com/quilljs/quill/pull/4086
- Add support for v1 list attributes by @justinbhopper in https://github.com/quilljs/quill/pull/4082
- Expose types needed in public APIs by @luin in https://github.com/quilljs/quill/pull/4099
- Allow ref for insertBefore to be null by @luin in https://github.com/quilljs/quill/pull/4100
- Use stable version of Parchment by @luin in https://github.com/quilljs/quill/pull/4116
New Contributors
- @parthdesai93 made their first contribution in https://github.com/quilljs/quill/pull/2073
- @fengyuanchen made their first contribution in https://github.com/quilljs/quill/pull/2087
- @MicahLyle made their first contribution in https://github.com/quilljs/quill/pull/2122
- @bflatmajor made their first contribution in https://github.com/quilljs/quill/pull/2143
- @1c7 made their first contribution in https://github.com/quilljs/quill/pull/2219
- @vojtechsebo made their first contribution in https://github.com/quilljs/quill/pull/2223
- @RyanV made their first contribution in https://github.com/quilljs/quill/pull/2226
- @dgreensp made their first contribution in https://github.com/quilljs/quill/pull/2252
- @leandrogaspar made their first contribution in https://github.com/quilljs/quill/pull/2269
- @lixiaoyan made their first contribution in https://github.com/quilljs/quill/pull/2278
- @jbbakst made their first contribution in https://github.com/quilljs/quill/pull/2279
- @sisidovski made their first contribution in https://github.com/quilljs/quill/pull/2301
- @jfix made their first contribution in https://github.com/quilljs/quill/pull/2327
- @jonathanlloyd made their first contribution in https://github.com/quilljs/quill/pull/2439
- @philraj made their first contribution in https://github.com/quilljs/quill/pull/2452
- @bjenkins24 made their first contribution in https://github.com/quilljs/quill/pull/2457
- @Percipient24 made their first contribution in https://github.com/quilljs/quill/pull/2491
- @tboevil made their first contribution in https://github.com/quilljs/quill/pull/2569
- @unitehenry made their first contribution in https://github.com/quilljs/quill/pull/2675
- @DillonBroadus made their first contribution in https://github.com/quilljs/quill/pull/2710
- @edhowler made their first contribution in https://github.com/quilljs/quill/pull/2682
- @d4l-w4r made their first contribution in https://github.com/quilljs/quill/pull/2674
- @A-gambit made their first contribution in https://github.com/quilljs/quill/pull/3005
- @timgates42 made their first contribution in https://github.com/quilljs/quill/pull/3003
- @luin made their first contribution in https://github.com/quilljs/quill/pull/3013
- @haqer1 made their first contribution in https://github.com/quilljs/quill/pull/3043
- @mashuDuek made their first contribution in https://github.com/quilljs/quill/pull/3221
- @ndNovaDev made their first contribution in https://github.com/quilljs/quill/pull/3295
- @gan-h made their first contribution in https://github.com/quilljs/quill/pull/3314
- @tzyl made their first contribution in https://github.com/quilljs/quill/pull/2882
- @Dora1604 made their first contribution in https://github.com/quilljs/quill/pull/3337
- @joelcarrier made their first contribution in https://github.com/quilljs/quill/pull/3581
- @derrickreimer made their first contribution in https://github.com/quilljs/quill/pull/3477
- @SCG82 made their first contribution in https://github.com/quilljs/quill/pull/3656
- @diegohaz made their first contribution in https://github.com/quilljs/quill/pull/3426
- @eltociear made their first contribution in https://github.com/quilljs/quill/pull/3400
- @anish2690 made their first contribution in https://github.com/quilljs/quill/pull/2851
- @xavivars made their first contribution in https://github.com/quilljs/quill/pull/3755
- @kalys made their first contribution in https://github.com/quilljs/quill/pull/3514
- @taozhou-glean made their first contribution in https://github.com/quilljs/quill/pull/3780
- @cmrd-senya made their first contribution in https://github.com/quilljs/quill/pull/3615
- @bmakuh made their first contribution in https://github.com/quilljs/quill/pull/3845
- @fstrelczuk made their first contribution in https://github.com/quilljs/quill/pull/3609
- @dlitsman made their first contribution in https://github.com/quilljs/quill/pull/3877
- @fnlctrl made their first contribution in https://github.com/quilljs/quill/pull/3899
- @N-M made their first contribution in https://github.com/quilljs/quill/pull/3998
- @JayaKrishnaNamburu made their first contribution in https://github.com/quilljs/quill/pull/4020
- @justinbhopper made their first contribution in https://github.com/quilljs/quill/pull/4082
Full Changelog: https://github.com/quilljs/quill/compare/v1.3.7...v2.0.0