@vaadin/rich-text-editor 24.5.0-alpha1 → 24.5.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/README.md +1 -1
- package/package.json +15 -14
- package/src/vaadin-rich-text-editor-mixin.js +14 -19
- package/theme/lumo/vaadin-rich-text-editor-styles.js +3 -1
- package/vendor/vaadin-quill.js +3 -3
- package/vendor/vaadin-quill.js.map +1 -0
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
- package/vendor/vaadin-quill.min.js.map +0 -1
package/README.md
CHANGED
|
@@ -53,7 +53,7 @@ import '@vaadin/rich-text-editor/src/vaadin-rich-text-editor.js';
|
|
|
53
53
|
|
|
54
54
|
## Contributing
|
|
55
55
|
|
|
56
|
-
Read the [contributing guide](https://vaadin.com/docs/latest/contributing
|
|
56
|
+
Read the [contributing guide](https://vaadin.com/docs/latest/contributing) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
|
|
57
57
|
|
|
58
58
|
## License
|
|
59
59
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/rich-text-editor",
|
|
3
|
-
"version": "24.5.0-
|
|
3
|
+
"version": "24.5.0-alpha10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -41,29 +41,30 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
43
43
|
"@polymer/polymer": "^3.0.0",
|
|
44
|
-
"@vaadin/button": "24.5.0-
|
|
45
|
-
"@vaadin/component-base": "24.5.0-
|
|
46
|
-
"@vaadin/confirm-dialog": "24.5.0-
|
|
47
|
-
"@vaadin/
|
|
48
|
-
"@vaadin/
|
|
49
|
-
"@vaadin/
|
|
50
|
-
"@vaadin/vaadin-
|
|
51
|
-
"@vaadin/vaadin-
|
|
44
|
+
"@vaadin/button": "24.5.0-alpha10",
|
|
45
|
+
"@vaadin/component-base": "24.5.0-alpha10",
|
|
46
|
+
"@vaadin/confirm-dialog": "24.5.0-alpha10",
|
|
47
|
+
"@vaadin/overlay": "24.5.0-alpha10",
|
|
48
|
+
"@vaadin/text-field": "24.5.0-alpha10",
|
|
49
|
+
"@vaadin/tooltip": "24.5.0-alpha10",
|
|
50
|
+
"@vaadin/vaadin-lumo-styles": "24.5.0-alpha10",
|
|
51
|
+
"@vaadin/vaadin-material-styles": "24.5.0-alpha10",
|
|
52
|
+
"@vaadin/vaadin-themable-mixin": "24.5.0-alpha10",
|
|
52
53
|
"lit": "^3.0.0"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
|
-
"@
|
|
56
|
-
"@vaadin/
|
|
57
|
-
"@vaadin/testing-helpers": "^0.
|
|
56
|
+
"@vaadin/a11y-base": "24.5.0-alpha10",
|
|
57
|
+
"@vaadin/chai-plugins": "24.5.0-alpha10",
|
|
58
|
+
"@vaadin/testing-helpers": "^1.0.0",
|
|
58
59
|
"gulp": "^4.0.2",
|
|
59
60
|
"gulp-cli": "^2.3.0",
|
|
60
61
|
"gulp-iconfont": "^11.0.0",
|
|
61
|
-
"sinon": "^
|
|
62
|
+
"sinon": "^18.0.0"
|
|
62
63
|
},
|
|
63
64
|
"cvdlName": "vaadin-rich-text-editor",
|
|
64
65
|
"web-types": [
|
|
65
66
|
"web-types.json",
|
|
66
67
|
"web-types.lit.json"
|
|
67
68
|
],
|
|
68
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "6f9c37308031af872a98017bfab4de89aeacda51"
|
|
69
70
|
}
|
|
@@ -291,14 +291,7 @@ export const RichTextEditorMixin = (superClass) =>
|
|
|
291
291
|
disconnectedCallback() {
|
|
292
292
|
super.disconnectedCallback();
|
|
293
293
|
|
|
294
|
-
|
|
295
|
-
// gets applied in case of detach and re-attach.
|
|
296
|
-
if (this.__debounceSetValue && this.__debounceSetValue.isActive()) {
|
|
297
|
-
this.__debounceSetValue.flush();
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
this._editor.emitter.removeAllListeners();
|
|
301
|
-
this._editor.emitter.listeners = {};
|
|
294
|
+
this._editor.emitter.disconnect();
|
|
302
295
|
}
|
|
303
296
|
|
|
304
297
|
/** @private */
|
|
@@ -333,6 +326,18 @@ export const RichTextEditorMixin = (superClass) =>
|
|
|
333
326
|
await this.updateComplete;
|
|
334
327
|
}
|
|
335
328
|
|
|
329
|
+
this._editor.emitter.connect();
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/** @protected */
|
|
333
|
+
ready() {
|
|
334
|
+
super.ready();
|
|
335
|
+
|
|
336
|
+
this._toolbarConfig = this._prepareToolbar();
|
|
337
|
+
this._toolbar = this._toolbarConfig.container;
|
|
338
|
+
|
|
339
|
+
this._addToolbarListeners();
|
|
340
|
+
|
|
336
341
|
const editor = this.shadowRoot.querySelector('[part="content"]');
|
|
337
342
|
|
|
338
343
|
this._editor = new Quill(editor, {
|
|
@@ -413,16 +418,6 @@ export const RichTextEditorMixin = (superClass) =>
|
|
|
413
418
|
|
|
414
419
|
// Flush pending htmlValue only once the editor is fully initialized
|
|
415
420
|
this.__flushPendingHtmlValue();
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
/** @protected */
|
|
419
|
-
ready() {
|
|
420
|
-
super.ready();
|
|
421
|
-
|
|
422
|
-
this._toolbarConfig = this._prepareToolbar();
|
|
423
|
-
this._toolbar = this._toolbarConfig.container;
|
|
424
|
-
|
|
425
|
-
this._addToolbarListeners();
|
|
426
421
|
|
|
427
422
|
this.$.backgroundPopup.target = this.shadowRoot.querySelector('#btn-background');
|
|
428
423
|
this.$.colorPopup.target = this.shadowRoot.querySelector('#btn-color');
|
|
@@ -764,7 +759,7 @@ export const RichTextEditorMixin = (superClass) =>
|
|
|
764
759
|
let content = editor.innerHTML;
|
|
765
760
|
|
|
766
761
|
// Remove Quill classes, e.g. ql-syntax, except for align
|
|
767
|
-
content = content.replace(/class="([^"]*)"/gu, (
|
|
762
|
+
content = content.replace(/class="([^"]*)"/gu, (_match, group1) => {
|
|
768
763
|
const classes = group1.split(' ').filter((className) => {
|
|
769
764
|
return !className.startsWith('ql-') || className.startsWith('ql-align');
|
|
770
765
|
});
|
|
@@ -57,7 +57,9 @@ const richTextEditor = css`
|
|
|
57
57
|
color: var(--lumo-contrast-60pct);
|
|
58
58
|
margin: 2px 1px;
|
|
59
59
|
cursor: var(--lumo-clickable-cursor);
|
|
60
|
-
transition:
|
|
60
|
+
transition:
|
|
61
|
+
background-color 100ms,
|
|
62
|
+
color 100ms;
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
[part~='toolbar-button']:focus,
|