@vaadin/rich-text-editor 24.0.0-alpha1 → 24.0.0-alpha11
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/LICENSE +1105 -248
- package/README.md +1 -1
- package/package.json +10 -10
- package/src/vaadin-rich-text-editor-content-styles.js +7 -2
- package/src/vaadin-rich-text-editor-icons.js +7 -2
- package/src/vaadin-rich-text-editor-styles.js +7 -2
- package/src/vaadin-rich-text-editor-toolbar-styles.js +7 -2
- package/src/vaadin-rich-text-editor.d.ts +7 -2
- package/src/vaadin-rich-text-editor.js +17 -12
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ Read the [contributing guide](https://vaadin.com/docs/latest/contributing/overvi
|
|
|
58
58
|
|
|
59
59
|
## License
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
This program is available under Vaadin Commercial License and Service Terms. For license terms, see LICENSE.
|
|
62
62
|
|
|
63
63
|
Vaadin collects usage statistics at development time to improve this product.
|
|
64
64
|
For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/rich-text-editor",
|
|
3
|
-
"version": "24.0.0-
|
|
3
|
+
"version": "24.0.0-alpha11",
|
|
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": "24.0.0-
|
|
44
|
-
"@vaadin/component-base": "24.0.0-
|
|
45
|
-
"@vaadin/confirm-dialog": "24.0.0-
|
|
46
|
-
"@vaadin/text-field": "24.0.0-
|
|
47
|
-
"@vaadin/tooltip": "24.0.0-
|
|
48
|
-
"@vaadin/vaadin-lumo-styles": "24.0.0-
|
|
49
|
-
"@vaadin/vaadin-material-styles": "24.0.0-
|
|
50
|
-
"@vaadin/vaadin-themable-mixin": "24.0.0-
|
|
43
|
+
"@vaadin/button": "24.0.0-alpha11",
|
|
44
|
+
"@vaadin/component-base": "24.0.0-alpha11",
|
|
45
|
+
"@vaadin/confirm-dialog": "24.0.0-alpha11",
|
|
46
|
+
"@vaadin/text-field": "24.0.0-alpha11",
|
|
47
|
+
"@vaadin/tooltip": "24.0.0-alpha11",
|
|
48
|
+
"@vaadin/vaadin-lumo-styles": "24.0.0-alpha11",
|
|
49
|
+
"@vaadin/vaadin-material-styles": "24.0.0-alpha11",
|
|
50
|
+
"@vaadin/vaadin-themable-mixin": "24.0.0-alpha11"
|
|
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": "641b3d96ceeb3e503a093682ebe686afdd8c3a68"
|
|
66
66
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*
|
|
3
|
+
* Copyright (c) 2000 - 2023 Vaadin Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
|
+
* license.
|
|
5
10
|
*/
|
|
6
11
|
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
7
12
|
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*
|
|
3
|
+
* Copyright (c) 2000 - 2023 Vaadin Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
|
+
* license.
|
|
5
10
|
*/
|
|
6
11
|
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
7
12
|
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*
|
|
3
|
+
* Copyright (c) 2000 - 2023 Vaadin Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
|
+
* license.
|
|
5
10
|
*/
|
|
6
11
|
import { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
7
12
|
import { contentStyles } from './vaadin-rich-text-editor-content-styles.js';
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*
|
|
3
|
+
* Copyright (c) 2000 - 2023 Vaadin Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
|
+
* license.
|
|
5
10
|
*/
|
|
6
11
|
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
7
12
|
import { iconsStyles } from './vaadin-rich-text-editor-icons.js';
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*
|
|
3
|
+
* Copyright (c) 2000 - 2023 Vaadin Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
|
+
* license.
|
|
5
10
|
*/
|
|
6
11
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
7
12
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*
|
|
3
|
+
* Copyright (c) 2000 - 2023 Vaadin Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
|
+
* license.
|
|
5
10
|
*/
|
|
6
11
|
import '@vaadin/button/src/vaadin-button.js';
|
|
7
12
|
import '@vaadin/confirm-dialog/src/vaadin-confirm-dialog.js';
|
|
@@ -506,6 +511,13 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
506
511
|
return ['_valueChanged(value, _editor)', '_disabledChanged(disabled, readonly, _editor)'];
|
|
507
512
|
}
|
|
508
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
|
+
|
|
509
521
|
/**
|
|
510
522
|
* @param {string} prop
|
|
511
523
|
* @param {?string} oldVal
|
|
@@ -901,17 +913,17 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
901
913
|
let content = editor.innerHTML;
|
|
902
914
|
|
|
903
915
|
// Remove Quill classes, e.g. ql-syntax, except for align
|
|
904
|
-
content = content.replace(/\s*ql-(?!align)[\w-]*\s*/
|
|
916
|
+
content = content.replace(/\s*ql-(?!align)[\w-]*\s*/gu, '');
|
|
905
917
|
|
|
906
918
|
// Replace Quill align classes with inline styles
|
|
907
919
|
[this.__dir === 'rtl' ? 'left' : 'right', 'center', 'justify'].forEach((align) => {
|
|
908
920
|
content = content.replace(
|
|
909
|
-
new RegExp(` class=[\\\\]?"\\s?ql-align-${align}[\\\\]?"`, '
|
|
921
|
+
new RegExp(` class=[\\\\]?"\\s?ql-align-${align}[\\\\]?"`, 'gu'),
|
|
910
922
|
` style="text-align: ${align}"`,
|
|
911
923
|
);
|
|
912
924
|
});
|
|
913
925
|
|
|
914
|
-
content = content.replace(/ class=""/
|
|
926
|
+
content = content.replace(/ class=""/gu, '');
|
|
915
927
|
|
|
916
928
|
this._setHtmlValue(content);
|
|
917
929
|
}
|
|
@@ -953,13 +965,6 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
953
965
|
);
|
|
954
966
|
}
|
|
955
967
|
|
|
956
|
-
/** @private */
|
|
957
|
-
get _toolbarButtons() {
|
|
958
|
-
return Array.from(this.shadowRoot.querySelectorAll('[part="toolbar"] button')).filter((btn) => {
|
|
959
|
-
return btn.clientHeight > 0;
|
|
960
|
-
});
|
|
961
|
-
}
|
|
962
|
-
|
|
963
968
|
/** @private */
|
|
964
969
|
_clear() {
|
|
965
970
|
this._editor.deleteText(0, this._editor.getLength(), SOURCE.SILENT);
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED