@vaadin/rich-text-editor 23.3.22 → 23.3.23
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.js +25 -12
- 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": "23.3.
|
|
3
|
+
"version": "23.3.23",
|
|
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": "~23.3.
|
|
44
|
-
"@vaadin/component-base": "~23.3.
|
|
45
|
-
"@vaadin/confirm-dialog": "~23.3.
|
|
46
|
-
"@vaadin/text-field": "~23.3.
|
|
47
|
-
"@vaadin/tooltip": "~23.3.
|
|
48
|
-
"@vaadin/vaadin-lumo-styles": "~23.3.
|
|
49
|
-
"@vaadin/vaadin-material-styles": "~23.3.
|
|
50
|
-
"@vaadin/vaadin-themable-mixin": "~23.3.
|
|
43
|
+
"@vaadin/button": "~23.3.23",
|
|
44
|
+
"@vaadin/component-base": "~23.3.23",
|
|
45
|
+
"@vaadin/confirm-dialog": "~23.3.23",
|
|
46
|
+
"@vaadin/text-field": "~23.3.23",
|
|
47
|
+
"@vaadin/tooltip": "~23.3.23",
|
|
48
|
+
"@vaadin/vaadin-lumo-styles": "~23.3.23",
|
|
49
|
+
"@vaadin/vaadin-material-styles": "~23.3.23",
|
|
50
|
+
"@vaadin/vaadin-themable-mixin": "~23.3.23"
|
|
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": "0027e59e0405f668a089c10e75bb488da9a665b8"
|
|
66
66
|
}
|
|
@@ -159,7 +159,7 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
159
159
|
|
|
160
160
|
<div class="vaadin-rich-text-editor-container">
|
|
161
161
|
<!-- Create toolbar container -->
|
|
162
|
-
<div part="toolbar">
|
|
162
|
+
<div part="toolbar" role="toolbar">
|
|
163
163
|
<span part="toolbar-group toolbar-group-history">
|
|
164
164
|
<!-- Undo and Redo -->
|
|
165
165
|
<button id="btn-undo" type="button" part="toolbar-button toolbar-button-undo" on-click="_undo"></button>
|
|
@@ -526,6 +526,13 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
|
|
529
|
+
/** @protected */
|
|
530
|
+
disconnectedCallback() {
|
|
531
|
+
super.disconnectedCallback();
|
|
532
|
+
this._editor.emitter.removeAllListeners();
|
|
533
|
+
this._editor.emitter.listeners = {};
|
|
534
|
+
}
|
|
535
|
+
|
|
529
536
|
/** @private */
|
|
530
537
|
__setDirection(dir) {
|
|
531
538
|
// Needed for proper `ql-align` class to be set and activate the toolbar align button
|
|
@@ -547,18 +554,14 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
547
554
|
}
|
|
548
555
|
|
|
549
556
|
/** @protected */
|
|
550
|
-
|
|
551
|
-
super.
|
|
557
|
+
connectedCallback() {
|
|
558
|
+
super.connectedCallback();
|
|
552
559
|
|
|
553
560
|
const editor = this.shadowRoot.querySelector('[part="content"]');
|
|
554
|
-
const toolbarConfig = this._prepareToolbar();
|
|
555
|
-
this._toolbar = toolbarConfig.container;
|
|
556
|
-
|
|
557
|
-
this._addToolbarListeners();
|
|
558
561
|
|
|
559
562
|
this._editor = new Quill(editor, {
|
|
560
563
|
modules: {
|
|
561
|
-
toolbar:
|
|
564
|
+
toolbar: this._toolbarConfig,
|
|
562
565
|
},
|
|
563
566
|
});
|
|
564
567
|
|
|
@@ -570,10 +573,6 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
570
573
|
this.__patchFirefoxFocus();
|
|
571
574
|
}
|
|
572
575
|
|
|
573
|
-
this.$.linkDialog.$.dialog.$.overlay.addEventListener('vaadin-overlay-open', () => {
|
|
574
|
-
this.$.linkUrl.focus();
|
|
575
|
-
});
|
|
576
|
-
|
|
577
576
|
const editorContent = editor.querySelector('.ql-editor');
|
|
578
577
|
|
|
579
578
|
editorContent.setAttribute('role', 'textbox');
|
|
@@ -604,6 +603,20 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
604
603
|
this._editor.on('selection-change', this.__announceFormatting.bind(this));
|
|
605
604
|
}
|
|
606
605
|
|
|
606
|
+
/** @protected */
|
|
607
|
+
ready() {
|
|
608
|
+
super.ready();
|
|
609
|
+
|
|
610
|
+
this._toolbarConfig = this._prepareToolbar();
|
|
611
|
+
this._toolbar = this._toolbarConfig.container;
|
|
612
|
+
|
|
613
|
+
this._addToolbarListeners();
|
|
614
|
+
|
|
615
|
+
this.$.linkDialog.$.dialog.$.overlay.addEventListener('vaadin-overlay-open', () => {
|
|
616
|
+
this.$.linkUrl.focus();
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
|
|
607
620
|
/** @private */
|
|
608
621
|
_prepareToolbar() {
|
|
609
622
|
const clean = Quill.imports['modules/toolbar'].DEFAULTS.handlers.clean;
|
package/web-types.json
CHANGED