@vaadin/rich-text-editor 23.3.3 → 24.0.0-alpha10
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 +10 -10
- package/src/vaadin-rich-text-editor-content-styles.js +1 -1
- package/src/vaadin-rich-text-editor-icons.js +1 -1
- package/src/vaadin-rich-text-editor-styles.js +1 -1
- package/src/vaadin-rich-text-editor-toolbar-styles.js +1 -1
- package/src/vaadin-rich-text-editor.d.ts +1 -1
- package/src/vaadin-rich-text-editor.js +11 -11
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/rich-text-editor",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.0.0-alpha10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@polymer/polymer": "^3.0.0",
|
|
43
|
-
"@vaadin/button": "
|
|
44
|
-
"@vaadin/component-base": "
|
|
45
|
-
"@vaadin/confirm-dialog": "
|
|
46
|
-
"@vaadin/text-field": "
|
|
47
|
-
"@vaadin/tooltip": "
|
|
48
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
49
|
-
"@vaadin/vaadin-material-styles": "
|
|
50
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
43
|
+
"@vaadin/button": "24.0.0-alpha10",
|
|
44
|
+
"@vaadin/component-base": "24.0.0-alpha10",
|
|
45
|
+
"@vaadin/confirm-dialog": "24.0.0-alpha10",
|
|
46
|
+
"@vaadin/text-field": "24.0.0-alpha10",
|
|
47
|
+
"@vaadin/tooltip": "24.0.0-alpha10",
|
|
48
|
+
"@vaadin/vaadin-lumo-styles": "24.0.0-alpha10",
|
|
49
|
+
"@vaadin/vaadin-material-styles": "24.0.0-alpha10",
|
|
50
|
+
"@vaadin/vaadin-themable-mixin": "24.0.0-alpha10"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@esm-bundle/chai": "^4.3.4",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"web-types.json",
|
|
63
63
|
"web-types.lit.json"
|
|
64
64
|
],
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "2e04534d8b47bcd216f89b5f849bafef1a73b174"
|
|
66
66
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2000 -
|
|
3
|
+
* Copyright (c) 2000 - 2023 Vaadin Ltd.
|
|
4
4
|
*
|
|
5
5
|
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
6
|
*
|
|
@@ -511,6 +511,13 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
511
511
|
return ['_valueChanged(value, _editor)', '_disabledChanged(disabled, readonly, _editor)'];
|
|
512
512
|
}
|
|
513
513
|
|
|
514
|
+
/** @private */
|
|
515
|
+
get _toolbarButtons() {
|
|
516
|
+
return Array.from(this.shadowRoot.querySelectorAll('[part="toolbar"] button')).filter((btn) => {
|
|
517
|
+
return btn.clientHeight > 0;
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
|
|
514
521
|
/**
|
|
515
522
|
* @param {string} prop
|
|
516
523
|
* @param {?string} oldVal
|
|
@@ -906,17 +913,17 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
906
913
|
let content = editor.innerHTML;
|
|
907
914
|
|
|
908
915
|
// Remove Quill classes, e.g. ql-syntax, except for align
|
|
909
|
-
content = content.replace(/\s*ql-(?!align)[\w-]*\s*/
|
|
916
|
+
content = content.replace(/\s*ql-(?!align)[\w-]*\s*/gu, '');
|
|
910
917
|
|
|
911
918
|
// Replace Quill align classes with inline styles
|
|
912
919
|
[this.__dir === 'rtl' ? 'left' : 'right', 'center', 'justify'].forEach((align) => {
|
|
913
920
|
content = content.replace(
|
|
914
|
-
new RegExp(` class=[\\\\]?"\\s?ql-align-${align}[\\\\]?"`, '
|
|
921
|
+
new RegExp(` class=[\\\\]?"\\s?ql-align-${align}[\\\\]?"`, 'gu'),
|
|
915
922
|
` style="text-align: ${align}"`,
|
|
916
923
|
);
|
|
917
924
|
});
|
|
918
925
|
|
|
919
|
-
content = content.replace(/ class=""/
|
|
926
|
+
content = content.replace(/ class=""/gu, '');
|
|
920
927
|
|
|
921
928
|
this._setHtmlValue(content);
|
|
922
929
|
}
|
|
@@ -958,13 +965,6 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
958
965
|
);
|
|
959
966
|
}
|
|
960
967
|
|
|
961
|
-
/** @private */
|
|
962
|
-
get _toolbarButtons() {
|
|
963
|
-
return Array.from(this.shadowRoot.querySelectorAll('[part="toolbar"] button')).filter((btn) => {
|
|
964
|
-
return btn.clientHeight > 0;
|
|
965
|
-
});
|
|
966
|
-
}
|
|
967
|
-
|
|
968
968
|
/** @private */
|
|
969
969
|
_clear() {
|
|
970
970
|
this._editor.deleteText(0, this._editor.getLength(), SOURCE.SILENT);
|
package/web-types.json
CHANGED