@vaadin/rich-text-editor 25.4.0-alpha3 → 25.4.0-alpha5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/rich-text-editor",
|
|
3
|
-
"version": "25.4.0-
|
|
3
|
+
"version": "25.4.0-alpha5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,22 +35,22 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "25.4.0-
|
|
39
|
-
"@vaadin/button": "25.4.0-
|
|
40
|
-
"@vaadin/component-base": "25.4.0-
|
|
41
|
-
"@vaadin/confirm-dialog": "25.4.0-
|
|
42
|
-
"@vaadin/overlay": "25.4.0-
|
|
43
|
-
"@vaadin/text-field": "25.4.0-
|
|
44
|
-
"@vaadin/tooltip": "25.4.0-
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "25.4.0-
|
|
38
|
+
"@vaadin/a11y-base": "25.4.0-alpha5",
|
|
39
|
+
"@vaadin/button": "25.4.0-alpha5",
|
|
40
|
+
"@vaadin/component-base": "25.4.0-alpha5",
|
|
41
|
+
"@vaadin/confirm-dialog": "25.4.0-alpha5",
|
|
42
|
+
"@vaadin/overlay": "25.4.0-alpha5",
|
|
43
|
+
"@vaadin/text-field": "25.4.0-alpha5",
|
|
44
|
+
"@vaadin/tooltip": "25.4.0-alpha5",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "25.4.0-alpha5",
|
|
46
46
|
"lit": "^3.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@vaadin/aura": "25.4.0-
|
|
50
|
-
"@vaadin/chai-plugins": "25.4.0-
|
|
51
|
-
"@vaadin/test-runner-commands": "25.4.0-
|
|
49
|
+
"@vaadin/aura": "25.4.0-alpha5",
|
|
50
|
+
"@vaadin/chai-plugins": "25.4.0-alpha5",
|
|
51
|
+
"@vaadin/test-runner-commands": "25.4.0-alpha5",
|
|
52
52
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
53
|
-
"@vaadin/vaadin-lumo-styles": "25.4.0-
|
|
53
|
+
"@vaadin/vaadin-lumo-styles": "25.4.0-alpha5",
|
|
54
54
|
"sinon": "^22.0.0"
|
|
55
55
|
},
|
|
56
56
|
"cvdlName": "vaadin-rich-text-editor",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"web-types.json",
|
|
60
60
|
"web-types.lit.json"
|
|
61
61
|
],
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "65e9c9e49c0a723b08ee91b9aae8b901e91a3597"
|
|
63
63
|
}
|
|
@@ -24,9 +24,9 @@ const QuillCodeBlockContainer = Quill.import('formats/code-block-container');
|
|
|
24
24
|
class CodeBlockContainer extends QuillCodeBlockContainer {
|
|
25
25
|
html(index, length) {
|
|
26
26
|
const markup = super.html(index, length);
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
const preTag =
|
|
27
|
+
const template = document.createElement('template');
|
|
28
|
+
template.innerHTML = markup;
|
|
29
|
+
const preTag = template.content.querySelector('pre');
|
|
30
30
|
if (preTag) {
|
|
31
31
|
preTag.setAttribute('spellcheck', 'false');
|
|
32
32
|
return preTag.outerHTML;
|
|
@@ -735,16 +735,17 @@ export const RichTextEditorMixin = (superClass) =>
|
|
|
735
735
|
|
|
736
736
|
/** @private */
|
|
737
737
|
__processQuillClasses(content) {
|
|
738
|
-
|
|
739
|
-
|
|
738
|
+
// Use template to parse the content inertly, without loading resources or running handlers
|
|
739
|
+
const template = document.createElement('template');
|
|
740
|
+
template.innerHTML = content;
|
|
740
741
|
// Process only elements with align or indent classes
|
|
741
|
-
const elementsToProcess =
|
|
742
|
+
const elementsToProcess = template.content.querySelectorAll('[class*="ql-align"], [class*="ql-indent"]');
|
|
742
743
|
elementsToProcess.forEach((element) => {
|
|
743
744
|
this.__processAlignClasses(element);
|
|
744
745
|
this.__processIndentClasses(element);
|
|
745
746
|
element.removeAttribute('class');
|
|
746
747
|
});
|
|
747
|
-
return
|
|
748
|
+
return template.innerHTML;
|
|
748
749
|
}
|
|
749
750
|
|
|
750
751
|
/** @private */
|