@vaadin/rich-text-editor 23.0.9 → 23.0.12
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": "23.0.
|
|
3
|
+
"version": "23.0.12",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@polymer/polymer": "^3.0.0",
|
|
41
|
-
"@vaadin/button": "^23.0.
|
|
42
|
-
"@vaadin/component-base": "^23.0.
|
|
43
|
-
"@vaadin/confirm-dialog": "^23.0.
|
|
44
|
-
"@vaadin/text-field": "^23.0.
|
|
41
|
+
"@vaadin/button": "^23.0.12",
|
|
42
|
+
"@vaadin/component-base": "^23.0.12",
|
|
43
|
+
"@vaadin/confirm-dialog": "^23.0.12",
|
|
44
|
+
"@vaadin/text-field": "^23.0.12",
|
|
45
45
|
"@vaadin/vaadin-license-checker": "^2.1.0",
|
|
46
|
-
"@vaadin/vaadin-lumo-styles": "^23.0.
|
|
47
|
-
"@vaadin/vaadin-material-styles": "^23.0.
|
|
48
|
-
"@vaadin/vaadin-themable-mixin": "^23.0.
|
|
46
|
+
"@vaadin/vaadin-lumo-styles": "^23.0.12",
|
|
47
|
+
"@vaadin/vaadin-material-styles": "^23.0.12",
|
|
48
|
+
"@vaadin/vaadin-themable-mixin": "^23.0.12"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@esm-bundle/chai": "^4.3.4",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"gulp-iconfont": "^11.0.0",
|
|
56
56
|
"sinon": "^9.2.1"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "717908c222c1e241259e30b4144cd5ba32734819"
|
|
59
59
|
}
|
|
@@ -181,13 +181,13 @@ declare class RichTextEditor extends ElementMixin(ThemableMixin(HTMLElement)) {
|
|
|
181
181
|
addEventListener<K extends keyof RichTextEditorEventMap>(
|
|
182
182
|
type: K,
|
|
183
183
|
listener: (this: RichTextEditor, ev: RichTextEditorEventMap[K]) => void,
|
|
184
|
-
options?: boolean | AddEventListenerOptions
|
|
184
|
+
options?: boolean | AddEventListenerOptions,
|
|
185
185
|
): void;
|
|
186
186
|
|
|
187
187
|
removeEventListener<K extends keyof RichTextEditorEventMap>(
|
|
188
188
|
type: K,
|
|
189
189
|
listener: (this: RichTextEditor, ev: RichTextEditorEventMap[K]) => void,
|
|
190
|
-
options?: boolean | EventListenerOptions
|
|
190
|
+
options?: boolean | EventListenerOptions,
|
|
191
191
|
): void;
|
|
192
192
|
}
|
|
193
193
|
|
|
@@ -31,19 +31,19 @@ const HANDLERS = [
|
|
|
31
31
|
'list',
|
|
32
32
|
'align',
|
|
33
33
|
'blockquote',
|
|
34
|
-
'code-block'
|
|
34
|
+
'code-block',
|
|
35
35
|
];
|
|
36
36
|
|
|
37
37
|
const SOURCE = {
|
|
38
38
|
API: 'api',
|
|
39
39
|
USER: 'user',
|
|
40
|
-
SILENT: 'silent'
|
|
40
|
+
SILENT: 'silent',
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
const STATE = {
|
|
44
44
|
DEFAULT: 0,
|
|
45
45
|
FOCUSED: 1,
|
|
46
|
-
CLICKED: 2
|
|
46
|
+
CLICKED: 2,
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
const TAB_KEY = 9;
|
|
@@ -382,7 +382,7 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
382
382
|
value: {
|
|
383
383
|
type: String,
|
|
384
384
|
notify: true,
|
|
385
|
-
value: ''
|
|
385
|
+
value: '',
|
|
386
386
|
},
|
|
387
387
|
|
|
388
388
|
/**
|
|
@@ -391,7 +391,7 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
391
391
|
htmlValue: {
|
|
392
392
|
type: String,
|
|
393
393
|
notify: true,
|
|
394
|
-
readOnly: true
|
|
394
|
+
readOnly: true,
|
|
395
395
|
},
|
|
396
396
|
|
|
397
397
|
/**
|
|
@@ -401,7 +401,7 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
401
401
|
disabled: {
|
|
402
402
|
type: Boolean,
|
|
403
403
|
value: false,
|
|
404
|
-
reflectToAttribute: true
|
|
404
|
+
reflectToAttribute: true,
|
|
405
405
|
},
|
|
406
406
|
|
|
407
407
|
/**
|
|
@@ -411,7 +411,7 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
411
411
|
readonly: {
|
|
412
412
|
type: Boolean,
|
|
413
413
|
value: false,
|
|
414
|
-
reflectToAttribute: true
|
|
414
|
+
reflectToAttribute: true,
|
|
415
415
|
},
|
|
416
416
|
|
|
417
417
|
/**
|
|
@@ -449,14 +449,14 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
449
449
|
linkDialogTitle: 'Link address',
|
|
450
450
|
ok: 'OK',
|
|
451
451
|
cancel: 'Cancel',
|
|
452
|
-
remove: 'Remove'
|
|
452
|
+
remove: 'Remove',
|
|
453
453
|
};
|
|
454
|
-
}
|
|
454
|
+
},
|
|
455
455
|
},
|
|
456
456
|
|
|
457
457
|
/** @private */
|
|
458
458
|
_editor: {
|
|
459
|
-
type: Object
|
|
459
|
+
type: Object,
|
|
460
460
|
},
|
|
461
461
|
|
|
462
462
|
/**
|
|
@@ -468,31 +468,31 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
468
468
|
/** @private */
|
|
469
469
|
__lastCommittedChange: {
|
|
470
470
|
type: String,
|
|
471
|
-
value: ''
|
|
471
|
+
value: '',
|
|
472
472
|
},
|
|
473
473
|
|
|
474
474
|
/** @private */
|
|
475
475
|
_linkEditing: {
|
|
476
|
-
type: Boolean
|
|
476
|
+
type: Boolean,
|
|
477
477
|
},
|
|
478
478
|
|
|
479
479
|
/** @private */
|
|
480
480
|
_linkRange: {
|
|
481
481
|
type: Object,
|
|
482
|
-
value: null
|
|
482
|
+
value: null,
|
|
483
483
|
},
|
|
484
484
|
|
|
485
485
|
/** @private */
|
|
486
486
|
_linkIndex: {
|
|
487
487
|
type: Number,
|
|
488
|
-
value: null
|
|
488
|
+
value: null,
|
|
489
489
|
},
|
|
490
490
|
|
|
491
491
|
/** @private */
|
|
492
492
|
_linkUrl: {
|
|
493
493
|
type: String,
|
|
494
|
-
value: ''
|
|
495
|
-
}
|
|
494
|
+
value: '',
|
|
495
|
+
},
|
|
496
496
|
};
|
|
497
497
|
}
|
|
498
498
|
|
|
@@ -558,8 +558,8 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
558
558
|
|
|
559
559
|
this._editor = new Quill(editor, {
|
|
560
560
|
modules: {
|
|
561
|
-
toolbar: toolbarConfig
|
|
562
|
-
}
|
|
561
|
+
toolbar: toolbarConfig,
|
|
562
|
+
},
|
|
563
563
|
});
|
|
564
564
|
|
|
565
565
|
this.__patchToolbar();
|
|
@@ -616,8 +616,8 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
616
616
|
clean: function () {
|
|
617
617
|
self._markToolbarClicked();
|
|
618
618
|
clean.call(this);
|
|
619
|
-
}
|
|
620
|
-
}
|
|
619
|
+
},
|
|
620
|
+
},
|
|
621
621
|
};
|
|
622
622
|
|
|
623
623
|
HANDLERS.forEach((handler) => {
|
|
@@ -912,7 +912,7 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
912
912
|
[this.__dir === 'rtl' ? 'left' : 'right', 'center', 'justify'].forEach((align) => {
|
|
913
913
|
content = content.replace(
|
|
914
914
|
new RegExp(` class=[\\\\]?"\\s?ql-align-${align}[\\\\]?"`, 'g'),
|
|
915
|
-
` style="text-align: ${align}"
|
|
915
|
+
` style="text-align: ${align}"`,
|
|
916
916
|
);
|
|
917
917
|
});
|
|
918
918
|
|
|
@@ -951,7 +951,7 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
951
951
|
.map((button) => button.getAttribute('title'))
|
|
952
952
|
.join(', ');
|
|
953
953
|
announcer.textContent = formatting;
|
|
954
|
-
}
|
|
954
|
+
},
|
|
955
955
|
);
|
|
956
956
|
}
|
|
957
957
|
|
|
@@ -1017,7 +1017,7 @@ class RichTextEditor extends ElementMixin(ThemableMixin(PolymerElement)) {
|
|
|
1017
1017
|
const range = this._editor.getSelection(true);
|
|
1018
1018
|
this._editor.updateContents(
|
|
1019
1019
|
new Quill.imports.delta().retain(range.index).delete(range.length).insert({ image }),
|
|
1020
|
-
SOURCE.USER
|
|
1020
|
+
SOURCE.USER,
|
|
1021
1021
|
);
|
|
1022
1022
|
this._markToolbarClicked();
|
|
1023
1023
|
this._editor.setSelection(range.index + 1, SOURCE.SILENT);
|