@vaadin/rich-text-editor 25.3.4 → 25.3.5
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.3.
|
|
3
|
+
"version": "25.3.5",
|
|
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.3.
|
|
39
|
-
"@vaadin/button": "~25.3.
|
|
40
|
-
"@vaadin/component-base": "~25.3.
|
|
41
|
-
"@vaadin/confirm-dialog": "~25.3.
|
|
42
|
-
"@vaadin/overlay": "~25.3.
|
|
43
|
-
"@vaadin/text-field": "~25.3.
|
|
44
|
-
"@vaadin/tooltip": "~25.3.
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "~25.3.
|
|
38
|
+
"@vaadin/a11y-base": "~25.3.5",
|
|
39
|
+
"@vaadin/button": "~25.3.5",
|
|
40
|
+
"@vaadin/component-base": "~25.3.5",
|
|
41
|
+
"@vaadin/confirm-dialog": "~25.3.5",
|
|
42
|
+
"@vaadin/overlay": "~25.3.5",
|
|
43
|
+
"@vaadin/text-field": "~25.3.5",
|
|
44
|
+
"@vaadin/tooltip": "~25.3.5",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "~25.3.5",
|
|
46
46
|
"lit": "^3.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@vaadin/aura": "~25.3.
|
|
50
|
-
"@vaadin/chai-plugins": "~25.3.
|
|
51
|
-
"@vaadin/test-runner-commands": "~25.3.
|
|
49
|
+
"@vaadin/aura": "~25.3.5",
|
|
50
|
+
"@vaadin/chai-plugins": "~25.3.5",
|
|
51
|
+
"@vaadin/test-runner-commands": "~25.3.5",
|
|
52
52
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
53
|
-
"@vaadin/vaadin-lumo-styles": "~25.3.
|
|
53
|
+
"@vaadin/vaadin-lumo-styles": "~25.3.5",
|
|
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": "d5dd5b95c78030be2a41c5fe768bc07d39bd3ebf"
|
|
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;
|
|
@@ -733,16 +733,17 @@ export const RichTextEditorMixin = (superClass) =>
|
|
|
733
733
|
|
|
734
734
|
/** @private */
|
|
735
735
|
__processQuillClasses(content) {
|
|
736
|
-
|
|
737
|
-
|
|
736
|
+
// Use template to parse the content inertly, without loading resources or running handlers
|
|
737
|
+
const template = document.createElement('template');
|
|
738
|
+
template.innerHTML = content;
|
|
738
739
|
// Process only elements with align or indent classes
|
|
739
|
-
const elementsToProcess =
|
|
740
|
+
const elementsToProcess = template.content.querySelectorAll('[class*="ql-align"], [class*="ql-indent"]');
|
|
740
741
|
elementsToProcess.forEach((element) => {
|
|
741
742
|
this.__processAlignClasses(element);
|
|
742
743
|
this.__processIndentClasses(element);
|
|
743
744
|
element.removeAttribute('class');
|
|
744
745
|
});
|
|
745
|
-
return
|
|
746
|
+
return template.innerHTML;
|
|
746
747
|
}
|
|
747
748
|
|
|
748
749
|
/** @private */
|