@vaadin/rich-text-editor 25.2.0-alpha9 → 25.2.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": "25.2.0-
|
|
3
|
+
"version": "25.2.0-beta1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,23 +35,22 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "25.2.0-
|
|
39
|
-
"@vaadin/button": "25.2.0-
|
|
40
|
-
"@vaadin/component-base": "25.2.0-
|
|
41
|
-
"@vaadin/confirm-dialog": "25.2.0-
|
|
42
|
-
"@vaadin/overlay": "25.2.0-
|
|
43
|
-
"@vaadin/text-field": "25.2.0-
|
|
44
|
-
"@vaadin/tooltip": "25.2.0-
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "25.2.0-
|
|
38
|
+
"@vaadin/a11y-base": "25.2.0-beta1",
|
|
39
|
+
"@vaadin/button": "25.2.0-beta1",
|
|
40
|
+
"@vaadin/component-base": "25.2.0-beta1",
|
|
41
|
+
"@vaadin/confirm-dialog": "25.2.0-beta1",
|
|
42
|
+
"@vaadin/overlay": "25.2.0-beta1",
|
|
43
|
+
"@vaadin/text-field": "25.2.0-beta1",
|
|
44
|
+
"@vaadin/tooltip": "25.2.0-beta1",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "25.2.0-beta1",
|
|
46
46
|
"lit": "^3.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@vaadin/
|
|
50
|
-
"@vaadin/
|
|
51
|
-
"@vaadin/
|
|
52
|
-
"@vaadin/test-runner-commands": "25.2.0-alpha9",
|
|
49
|
+
"@vaadin/aura": "25.2.0-beta1",
|
|
50
|
+
"@vaadin/chai-plugins": "25.2.0-beta1",
|
|
51
|
+
"@vaadin/test-runner-commands": "25.2.0-beta1",
|
|
53
52
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
54
|
-
"@vaadin/vaadin-lumo-styles": "25.2.0-
|
|
53
|
+
"@vaadin/vaadin-lumo-styles": "25.2.0-beta1",
|
|
55
54
|
"sinon": "^21.0.2"
|
|
56
55
|
},
|
|
57
56
|
"cvdlName": "vaadin-rich-text-editor",
|
|
@@ -60,5 +59,5 @@
|
|
|
60
59
|
"web-types.json",
|
|
61
60
|
"web-types.lit.json"
|
|
62
61
|
],
|
|
63
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "471a23f60d1eb725f98a33f62cb9664d9c0a4163"
|
|
64
63
|
}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*
|
|
5
5
|
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
7
|
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
8
|
* license.
|
|
10
9
|
*/
|
|
@@ -96,11 +95,8 @@ const DEFAULT_I18N = {
|
|
|
96
95
|
remove: 'Remove',
|
|
97
96
|
};
|
|
98
97
|
|
|
99
|
-
/**
|
|
100
|
-
* @polymerMixin
|
|
101
|
-
*/
|
|
102
98
|
export const RichTextEditorMixin = (superClass) =>
|
|
103
|
-
class RichTextEditorMixinClass extends I18nMixin(
|
|
99
|
+
class RichTextEditorMixinClass extends I18nMixin(superClass) {
|
|
104
100
|
static get properties() {
|
|
105
101
|
return {
|
|
106
102
|
/**
|
|
@@ -245,6 +241,10 @@ export const RichTextEditorMixin = (superClass) =>
|
|
|
245
241
|
return ['_valueChanged(value, _editor)', '_disabledChanged(disabled, readonly, _editor)'];
|
|
246
242
|
}
|
|
247
243
|
|
|
244
|
+
static get defaultI18n() {
|
|
245
|
+
return DEFAULT_I18N;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
248
|
/**
|
|
249
249
|
* The object used to localize this component. To change the default
|
|
250
250
|
* localization, replace this with an object that provides all properties, or
|
|
@@ -766,7 +766,7 @@ export const RichTextEditorMixin = (superClass) =>
|
|
|
766
766
|
const tabs = '\t'.repeat(level);
|
|
767
767
|
// Add tabs to content
|
|
768
768
|
const firstChild = element.firstChild;
|
|
769
|
-
if (firstChild
|
|
769
|
+
if (firstChild?.nodeType === Node.TEXT_NODE) {
|
|
770
770
|
firstChild.textContent = tabs + firstChild.textContent;
|
|
771
771
|
} else if (element.childNodes.length > 0) {
|
|
772
772
|
const tabNode = document.createTextNode(tabs);
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*
|
|
5
5
|
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
7
|
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
8
|
* license.
|
|
10
9
|
*/
|
|
@@ -137,10 +136,6 @@ export { RichTextEditorPopup };
|
|
|
137
136
|
*
|
|
138
137
|
* @customElement vaadin-rich-text-editor-popup-overlay
|
|
139
138
|
* @extends HTMLElement
|
|
140
|
-
* @mixes DirMixin
|
|
141
|
-
* @mixes ThemableMixin
|
|
142
|
-
* @mixes OverlayMixin
|
|
143
|
-
* @mixes PositionMixin
|
|
144
139
|
* @private
|
|
145
140
|
*/
|
|
146
141
|
class RichTextEditorPopupOverlay extends PositionMixin(
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*
|
|
5
5
|
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
7
|
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
8
|
* license.
|
|
10
9
|
*/
|
|
@@ -118,9 +117,6 @@ import { RichTextEditorMixin } from './vaadin-rich-text-editor-mixin.js';
|
|
|
118
117
|
*
|
|
119
118
|
* @customElement vaadin-rich-text-editor
|
|
120
119
|
* @extends HTMLElement
|
|
121
|
-
* @mixes ElementMixin
|
|
122
|
-
* @mixes RichTextEditorMixin
|
|
123
|
-
* @mixes ThemableMixin
|
|
124
120
|
*/
|
|
125
121
|
class RichTextEditor extends RichTextEditorMixin(
|
|
126
122
|
ElementMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement)))),
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/rich-text-editor",
|
|
4
|
-
"version": "25.2.0-
|
|
4
|
+
"version": "25.2.0-beta1",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -15,9 +15,7 @@
|
|
|
15
15
|
"description": "When true, the user can not modify, nor copy the editor content.",
|
|
16
16
|
"value": {
|
|
17
17
|
"type": [
|
|
18
|
-
"boolean"
|
|
19
|
-
"null",
|
|
20
|
-
"undefined"
|
|
18
|
+
"boolean"
|
|
21
19
|
]
|
|
22
20
|
}
|
|
23
21
|
},
|
|
@@ -26,9 +24,7 @@
|
|
|
26
24
|
"description": "When true, the user can not modify the editor content, but can copy it.",
|
|
27
25
|
"value": {
|
|
28
26
|
"type": [
|
|
29
|
-
"boolean"
|
|
30
|
-
"null",
|
|
31
|
-
"undefined"
|
|
27
|
+
"boolean"
|
|
32
28
|
]
|
|
33
29
|
}
|
|
34
30
|
},
|
|
@@ -48,9 +44,7 @@
|
|
|
48
44
|
"description": "Value is a list of the operations which describe change to the document.\nEach of those operations describe the change at the current index.\nThey can be an `insert`, `delete` or `retain`. The format is as follows:\n\n```js\n [\n { insert: 'Hello World' },\n { insert: '!', attributes: { bold: true }}\n ]\n```\n\nSee also https://github.com/quilljs/delta for detailed documentation.",
|
|
49
45
|
"value": {
|
|
50
46
|
"type": [
|
|
51
|
-
"string"
|
|
52
|
-
"null",
|
|
53
|
-
"undefined"
|
|
47
|
+
"string"
|
|
54
48
|
]
|
|
55
49
|
}
|
|
56
50
|
}
|
|
@@ -62,9 +56,7 @@
|
|
|
62
56
|
"description": "The list of colors used by the background and text color\nselection controls. Should contain an array of HEX strings.\n\nWhen user selects `#000000` (black) as a text color,\nor `#ffffff` (white) as a background color, it resets\nthe corresponding format for the selected text.",
|
|
63
57
|
"value": {
|
|
64
58
|
"type": [
|
|
65
|
-
"
|
|
66
|
-
"null",
|
|
67
|
-
"undefined"
|
|
59
|
+
"array"
|
|
68
60
|
]
|
|
69
61
|
}
|
|
70
62
|
},
|
|
@@ -73,9 +65,7 @@
|
|
|
73
65
|
"description": "When true, the user can not modify, nor copy the editor content.",
|
|
74
66
|
"value": {
|
|
75
67
|
"type": [
|
|
76
|
-
"boolean"
|
|
77
|
-
"null",
|
|
78
|
-
"undefined"
|
|
68
|
+
"boolean"
|
|
79
69
|
]
|
|
80
70
|
}
|
|
81
71
|
},
|
|
@@ -84,7 +74,7 @@
|
|
|
84
74
|
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe properties are used e.g. as the tooltips for the editor toolbar\nbuttons.",
|
|
85
75
|
"value": {
|
|
86
76
|
"type": [
|
|
87
|
-
"
|
|
77
|
+
"Object"
|
|
88
78
|
]
|
|
89
79
|
}
|
|
90
80
|
},
|
|
@@ -93,9 +83,7 @@
|
|
|
93
83
|
"description": "When true, the user can not modify the editor content, but can copy it.",
|
|
94
84
|
"value": {
|
|
95
85
|
"type": [
|
|
96
|
-
"boolean"
|
|
97
|
-
"null",
|
|
98
|
-
"undefined"
|
|
86
|
+
"boolean"
|
|
99
87
|
]
|
|
100
88
|
}
|
|
101
89
|
},
|
|
@@ -104,14 +92,16 @@
|
|
|
104
92
|
"description": "Value is a list of the operations which describe change to the document.\nEach of those operations describe the change at the current index.\nThey can be an `insert`, `delete` or `retain`. The format is as follows:\n\n```js\n [\n { insert: 'Hello World' },\n { insert: '!', attributes: { bold: true }}\n ]\n```\n\nSee also https://github.com/quilljs/delta for detailed documentation.",
|
|
105
93
|
"value": {
|
|
106
94
|
"type": [
|
|
107
|
-
"string"
|
|
108
|
-
"null",
|
|
109
|
-
"undefined"
|
|
95
|
+
"string"
|
|
110
96
|
]
|
|
111
97
|
}
|
|
112
98
|
}
|
|
113
99
|
],
|
|
114
100
|
"events": [
|
|
101
|
+
{
|
|
102
|
+
"name": "change",
|
|
103
|
+
"description": "Fired when the user commits a value change."
|
|
104
|
+
},
|
|
115
105
|
{
|
|
116
106
|
"name": "html-value-changed",
|
|
117
107
|
"description": "Fired when the `htmlValue` property changes."
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/rich-text-editor",
|
|
4
|
-
"version": "25.2.0-
|
|
4
|
+
"version": "25.2.0-beta1",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -20,29 +20,29 @@
|
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|
|
23
|
-
"name": "
|
|
24
|
-
"description": "
|
|
23
|
+
"name": ".colorOptions",
|
|
24
|
+
"description": "The list of colors used by the background and text color\nselection controls. Should contain an array of HEX strings.\n\nWhen user selects `#000000` (black) as a text color,\nor `#ffffff` (white) as a background color, it resets\nthe corresponding format for the selected text.",
|
|
25
25
|
"value": {
|
|
26
26
|
"kind": "expression"
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
"name": "?
|
|
31
|
-
"description": "When true, the user can not modify the editor content
|
|
30
|
+
"name": "?disabled",
|
|
31
|
+
"description": "When true, the user can not modify, nor copy the editor content.",
|
|
32
32
|
"value": {
|
|
33
33
|
"kind": "expression"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
|
-
"name": ".
|
|
38
|
-
"description": "The
|
|
37
|
+
"name": ".i18n",
|
|
38
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe properties are used e.g. as the tooltips for the editor toolbar\nbuttons.",
|
|
39
39
|
"value": {
|
|
40
40
|
"kind": "expression"
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
|
-
"name": "
|
|
45
|
-
"description": "
|
|
44
|
+
"name": "?readonly",
|
|
45
|
+
"description": "When true, the user can not modify the editor content, but can copy it.",
|
|
46
46
|
"value": {
|
|
47
47
|
"kind": "expression"
|
|
48
48
|
}
|
|
@@ -54,6 +54,13 @@
|
|
|
54
54
|
"kind": "expression"
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
+
{
|
|
58
|
+
"name": "@change",
|
|
59
|
+
"description": "Fired when the user commits a value change.",
|
|
60
|
+
"value": {
|
|
61
|
+
"kind": "expression"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
57
64
|
{
|
|
58
65
|
"name": "@html-value-changed",
|
|
59
66
|
"description": "Fired when the `htmlValue` property changes.",
|