@vaadin/rich-text-editor 24.0.0-alpha9 → 24.0.0-beta1
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": "24.0.0-
|
|
3
|
+
"version": "24.0.0-beta1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -40,18 +40,18 @@
|
|
|
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-beta1",
|
|
44
|
+
"@vaadin/component-base": "24.0.0-beta1",
|
|
45
|
+
"@vaadin/confirm-dialog": "24.0.0-beta1",
|
|
46
|
+
"@vaadin/text-field": "24.0.0-beta1",
|
|
47
|
+
"@vaadin/tooltip": "24.0.0-beta1",
|
|
48
|
+
"@vaadin/vaadin-lumo-styles": "24.0.0-beta1",
|
|
49
|
+
"@vaadin/vaadin-material-styles": "24.0.0-beta1",
|
|
50
|
+
"@vaadin/vaadin-themable-mixin": "24.0.0-beta1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@esm-bundle/chai": "^4.3.4",
|
|
54
|
-
"@vaadin/testing-helpers": "^0.
|
|
54
|
+
"@vaadin/testing-helpers": "^0.4.0",
|
|
55
55
|
"gulp": "^4.0.2",
|
|
56
56
|
"gulp-cli": "^2.3.0",
|
|
57
57
|
"gulp-iconfont": "^11.0.0",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"web-types.json",
|
|
63
63
|
"web-types.lit.json"
|
|
64
64
|
],
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "c5b48921a62482746df8e46994b37e1490fec27e"
|
|
66
66
|
}
|
|
@@ -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
|
|
@@ -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);
|
|
@@ -216,6 +216,32 @@ const richTextEditor = css`
|
|
|
216
216
|
}
|
|
217
217
|
`;
|
|
218
218
|
|
|
219
|
-
|
|
219
|
+
const contentStyles = css`
|
|
220
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
221
|
+
margin-top: 1.25em;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
:where(h1) {
|
|
225
|
+
margin-bottom: 0.75em;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
:where(h2) {
|
|
229
|
+
margin-bottom: 0.5em;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
:where(h3) {
|
|
233
|
+
margin-bottom: 0.5em;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
:where(h4) {
|
|
237
|
+
margin-bottom: 0.5em;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
:where(h5) {
|
|
241
|
+
margin-bottom: 0.25em;
|
|
242
|
+
}
|
|
243
|
+
`;
|
|
244
|
+
|
|
245
|
+
registerStyles('vaadin-rich-text-editor', [color, typography, richTextEditor, contentStyles], {
|
|
220
246
|
moduleId: 'lumo-rich-text-editor',
|
|
221
247
|
});
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED