-
Notifications
You must be signed in to change notification settings - Fork 87
refactor!: update to Quill v2.0 and use getSemanticHTML #9007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@web-padawan Not a bug, but by design how some Quill internal tags were removed to clean the html value: #6434 So I think change is valid as Quill has now method to get html value instead of our own hack. |
a4ebd07 to
d025045
Compare
I'm talking about a different logic added in #6651 and #6652 as a fix for vaadin/flow-components#5533. web-components/packages/rich-text-editor/test/basic.test.js Lines 318 to 323 in 76a7f05
UPD: this was introduced in slab/quill#4502 which landed in v2.0.3 patch release and a number of users were upset and had to pin to v2.0.2 - see discussion at slab/quill#4502 (comment) and this issue: slab/quill#4509 |
a93b758 to
59f4891
Compare
|
Updated the Quill fork to apply the workaround from slab/quill#4509 (comment), see vaadin/quill@76a4568. |
|
d73579d to
8f1e173
Compare
8f1e173 to
0b371ba
Compare
|
Updated Quill fork branch with support for ES module distribution: https://github.com/vaadin/quill/tree/vaadin-quill-v2 Tested and it works fine in dev page (and all web component tests are passing). This would enable us to do the following: -import '../vendor/vaadin-quill.js';
+import Quill from '@vaadin/quill/vaadin-quill.js';
-const Quill = window.Quill;
+// For backwards compatibility
+window.Quill = Quill;And then we can publish the fork to npm as |
|
1cc348a to
36d31e9
Compare
7cbb390 to
bbf4d36
Compare
|
Created a PR to hide caret in visual test (I noticed one of screenshots has it): #9924 |
3a91293 to
c80fbdf
Compare
5cac4d9 to
b3e61e9
Compare
The Quill 2.0 semantic HTML does not seem to output any "ql-*" classes except alignment.
The code tag seems to be still present in the semantic HTML output.
The workarounds are not necessary anymore since the Quill 2.0 semantic HTML does not contain them. The alignment class transformation is left intact.
12df0ce to
2fa845f
Compare
|
|
This ticket/PR has been released with Vaadin 25.0.0-beta2. |



Description
Fixes #1680
getComposedRanges()API available since Safari 17+htmlValuelogic to usegetSemanticHTML()API instead ofinnerHTMLspellcheck="false"on<pre>tag<code>tags e.g. when usingdangerouslySetHtmlValue('<pre><code>123</code></pre>');htmlValuecontains instead of regular whitespacegetSemanticHTMLis broken slab/quill#4509li[data-list='bullet'] > .ql-ui::beforewithcontent: '\\2022';for bullets - replaced those with nativelist-style-typefor now (didn't manage to get custom bullets use correct vertical alignment).Type of change