@vaadin/rich-text-editor 24.3.0-alpha1 → 24.3.0-alpha11
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 +13 -12
- package/src/vaadin-lit-rich-text-editor.d.ts +11 -0
- package/src/vaadin-lit-rich-text-editor.js +284 -0
- package/src/vaadin-rich-text-editor-mixin.d.ts +109 -0
- package/src/vaadin-rich-text-editor-mixin.js +872 -0
- package/src/vaadin-rich-text-editor-styles.js +30 -1
- package/src/vaadin-rich-text-editor.d.ts +4 -93
- package/src/vaadin-rich-text-editor.js +4 -861
- package/theme/lumo/vaadin-lit-rich-text-editor.js +6 -0
- package/theme/lumo/vaadin-rich-text-editor-styles.js +4 -2
- package/theme/material/vaadin-lit-rich-text-editor.js +6 -0
- package/vaadin-lit-rich-text-editor.d.ts +1 -0
- package/vaadin-lit-rich-text-editor.js +2 -0
- package/vendor/vaadin-quill.js +2 -2
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/rich-text-editor",
|
|
3
|
-
"version": "24.3.0-
|
|
3
|
+
"version": "24.3.0-alpha11",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,20 +39,21 @@
|
|
|
39
39
|
"polymer"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
+
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
42
43
|
"@polymer/polymer": "^3.0.0",
|
|
43
|
-
"@vaadin/button": "24.3.0-
|
|
44
|
-
"@vaadin/component-base": "24.3.0-
|
|
45
|
-
"@vaadin/confirm-dialog": "24.3.0-
|
|
46
|
-
"@vaadin/text-field": "24.3.0-
|
|
47
|
-
"@vaadin/tooltip": "24.3.0-
|
|
48
|
-
"@vaadin/vaadin-lumo-styles": "24.3.0-
|
|
49
|
-
"@vaadin/vaadin-material-styles": "24.3.0-
|
|
50
|
-
"@vaadin/vaadin-themable-mixin": "24.3.0-
|
|
44
|
+
"@vaadin/button": "24.3.0-alpha11",
|
|
45
|
+
"@vaadin/component-base": "24.3.0-alpha11",
|
|
46
|
+
"@vaadin/confirm-dialog": "24.3.0-alpha11",
|
|
47
|
+
"@vaadin/text-field": "24.3.0-alpha11",
|
|
48
|
+
"@vaadin/tooltip": "24.3.0-alpha11",
|
|
49
|
+
"@vaadin/vaadin-lumo-styles": "24.3.0-alpha11",
|
|
50
|
+
"@vaadin/vaadin-material-styles": "24.3.0-alpha11",
|
|
51
|
+
"@vaadin/vaadin-themable-mixin": "24.3.0-alpha11"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
53
54
|
"@esm-bundle/chai": "^4.3.4",
|
|
54
|
-
"@vaadin/a11y-base": "24.3.0-
|
|
55
|
-
"@vaadin/testing-helpers": "^0.
|
|
55
|
+
"@vaadin/a11y-base": "24.3.0-alpha11",
|
|
56
|
+
"@vaadin/testing-helpers": "^0.6.0",
|
|
56
57
|
"gulp": "^4.0.2",
|
|
57
58
|
"gulp-cli": "^2.3.0",
|
|
58
59
|
"gulp-iconfont": "^11.0.0",
|
|
@@ -63,5 +64,5 @@
|
|
|
63
64
|
"web-types.json",
|
|
64
65
|
"web-types.lit.json"
|
|
65
66
|
],
|
|
66
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "123cf569a1b6ef6f4ef5fe8e60cb8d988699b98c"
|
|
67
68
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2000 - 2023 Vaadin Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
|
+
* license.
|
|
10
|
+
*/
|
|
11
|
+
export * from './vaadin-rich-text-editor.js';
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2000 - 2023 Vaadin Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
|
+
* license.
|
|
10
|
+
*/
|
|
11
|
+
import '@vaadin/button/src/vaadin-lit-button.js';
|
|
12
|
+
import '@vaadin/confirm-dialog/src/vaadin-lit-confirm-dialog.js';
|
|
13
|
+
import '@vaadin/text-field/src/vaadin-lit-text-field.js';
|
|
14
|
+
import '@vaadin/tooltip/src/vaadin-lit-tooltip.js';
|
|
15
|
+
import { html, LitElement } from 'lit';
|
|
16
|
+
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
17
|
+
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
18
|
+
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
19
|
+
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
20
|
+
import { RichTextEditorMixin } from './vaadin-rich-text-editor-mixin.js';
|
|
21
|
+
import { richTextEditorStyles } from './vaadin-rich-text-editor-styles.js';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* LitElement based version of `<vaadin-rich-text-editor>` web component.
|
|
25
|
+
*
|
|
26
|
+
* ## Disclaimer
|
|
27
|
+
*
|
|
28
|
+
* This component is an experiment not intended for publishing to npm.
|
|
29
|
+
* There is no ETA regarding specific Vaadin version where it'll land.
|
|
30
|
+
*/
|
|
31
|
+
class RichTextEditor extends RichTextEditorMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
|
|
32
|
+
static get is() {
|
|
33
|
+
return 'vaadin-rich-text-editor';
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static get cvdlName() {
|
|
37
|
+
return 'vaadin-rich-text-editor';
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
static get styles() {
|
|
41
|
+
return richTextEditorStyles;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** @protected */
|
|
45
|
+
render() {
|
|
46
|
+
return html`
|
|
47
|
+
<div class="vaadin-rich-text-editor-container">
|
|
48
|
+
<!-- Create toolbar container -->
|
|
49
|
+
<div part="toolbar" role="toolbar">
|
|
50
|
+
<span part="toolbar-group toolbar-group-history">
|
|
51
|
+
<!-- Undo and Redo -->
|
|
52
|
+
<button
|
|
53
|
+
id="btn-undo"
|
|
54
|
+
type="button"
|
|
55
|
+
part="toolbar-button toolbar-button-undo"
|
|
56
|
+
@click="${this._undo}"
|
|
57
|
+
></button>
|
|
58
|
+
<vaadin-tooltip for="btn-undo" .text="${this.i18n.undo}"></vaadin-tooltip>
|
|
59
|
+
|
|
60
|
+
<button
|
|
61
|
+
id="btn-redo"
|
|
62
|
+
type="button"
|
|
63
|
+
part="toolbar-button toolbar-button-redo"
|
|
64
|
+
@click="${this._redo}"
|
|
65
|
+
></button>
|
|
66
|
+
<vaadin-tooltip for="btn-redo" .text="${this.i18n.redo}"></vaadin-tooltip>
|
|
67
|
+
</span>
|
|
68
|
+
|
|
69
|
+
<span part="toolbar-group toolbar-group-emphasis">
|
|
70
|
+
<!-- Bold -->
|
|
71
|
+
<button id="btn-bold" class="ql-bold" part="toolbar-button toolbar-button-bold"></button>
|
|
72
|
+
<vaadin-tooltip for="btn-bold" .text="${this.i18n.bold}"></vaadin-tooltip>
|
|
73
|
+
|
|
74
|
+
<!-- Italic -->
|
|
75
|
+
<button id="btn-italic" class="ql-italic" part="toolbar-button toolbar-button-italic"></button>
|
|
76
|
+
<vaadin-tooltip for="btn-italic" .text="${this.i18n.italic}"></vaadin-tooltip>
|
|
77
|
+
|
|
78
|
+
<!-- Underline -->
|
|
79
|
+
<button id="btn-underline" class="ql-underline" part="toolbar-button toolbar-button-underline"></button>
|
|
80
|
+
<vaadin-tooltip for="btn-underline" .text="${this.i18n.underline}"></vaadin-tooltip>
|
|
81
|
+
|
|
82
|
+
<!-- Strike -->
|
|
83
|
+
<button id="btn-strike" class="ql-strike" part="toolbar-button toolbar-button-strike"></button>
|
|
84
|
+
<vaadin-tooltip for="btn-strike" .text="${this.i18n.strike}"></vaadin-tooltip>
|
|
85
|
+
</span>
|
|
86
|
+
|
|
87
|
+
<span part="toolbar-group toolbar-group-heading">
|
|
88
|
+
<!-- Header buttons -->
|
|
89
|
+
<button
|
|
90
|
+
id="btn-h1"
|
|
91
|
+
type="button"
|
|
92
|
+
class="ql-header"
|
|
93
|
+
value="1"
|
|
94
|
+
part="toolbar-button toolbar-button-h1"
|
|
95
|
+
></button>
|
|
96
|
+
<vaadin-tooltip for="btn-h1" .text="${this.i18n.h1}"></vaadin-tooltip>
|
|
97
|
+
<button
|
|
98
|
+
id="btn-h2"
|
|
99
|
+
type="button"
|
|
100
|
+
class="ql-header"
|
|
101
|
+
value="2"
|
|
102
|
+
part="toolbar-button toolbar-button-h2"
|
|
103
|
+
></button>
|
|
104
|
+
<vaadin-tooltip for="btn-h2" .text="${this.i18n.h2}"></vaadin-tooltip>
|
|
105
|
+
<button
|
|
106
|
+
id="btn-h3"
|
|
107
|
+
type="button"
|
|
108
|
+
class="ql-header"
|
|
109
|
+
value="3"
|
|
110
|
+
part="toolbar-button toolbar-button-h3"
|
|
111
|
+
></button>
|
|
112
|
+
<vaadin-tooltip for="btn-h3" .text="${this.i18n.h3}"></vaadin-tooltip>
|
|
113
|
+
</span>
|
|
114
|
+
|
|
115
|
+
<span part="toolbar-group toolbar-group-glyph-transformation">
|
|
116
|
+
<!-- Subscript and superscript -->
|
|
117
|
+
<button
|
|
118
|
+
id="btn-subscript"
|
|
119
|
+
class="ql-script"
|
|
120
|
+
value="sub"
|
|
121
|
+
part="toolbar-button toolbar-button-subscript"
|
|
122
|
+
></button>
|
|
123
|
+
<vaadin-tooltip for="btn-subscript" .text="${this.i18n.subscript}"></vaadin-tooltip>
|
|
124
|
+
<button
|
|
125
|
+
id="btn-superscript"
|
|
126
|
+
class="ql-script"
|
|
127
|
+
value="super"
|
|
128
|
+
part="toolbar-button toolbar-button-superscript"
|
|
129
|
+
></button>
|
|
130
|
+
<vaadin-tooltip for="btn-superscript" text="${this.i18n.superscript}"></vaadin-tooltip>
|
|
131
|
+
</span>
|
|
132
|
+
|
|
133
|
+
<span part="toolbar-group toolbar-group-list">
|
|
134
|
+
<!-- List buttons -->
|
|
135
|
+
<button
|
|
136
|
+
id="btn-ol"
|
|
137
|
+
type="button"
|
|
138
|
+
class="ql-list"
|
|
139
|
+
value="ordered"
|
|
140
|
+
part="toolbar-button toolbar-button-list-ordered"
|
|
141
|
+
></button>
|
|
142
|
+
<vaadin-tooltip for="btn-ol" text="${this.i18n.listOrdered}"></vaadin-tooltip>
|
|
143
|
+
<button
|
|
144
|
+
id="btn-ul"
|
|
145
|
+
type="button"
|
|
146
|
+
class="ql-list"
|
|
147
|
+
value="bullet"
|
|
148
|
+
part="toolbar-button toolbar-button-list-bullet"
|
|
149
|
+
></button>
|
|
150
|
+
<vaadin-tooltip for="btn-ul" text="${this.i18n.listBullet}"></vaadin-tooltip>
|
|
151
|
+
</span>
|
|
152
|
+
|
|
153
|
+
<span part="toolbar-group toolbar-group-alignment">
|
|
154
|
+
<!-- Align buttons -->
|
|
155
|
+
<button
|
|
156
|
+
id="btn-left"
|
|
157
|
+
type="button"
|
|
158
|
+
class="ql-align"
|
|
159
|
+
value=""
|
|
160
|
+
part="toolbar-button toolbar-button-align-left"
|
|
161
|
+
></button>
|
|
162
|
+
<vaadin-tooltip for="btn-left" .text="${this.i18n.alignLeft}"></vaadin-tooltip>
|
|
163
|
+
<button
|
|
164
|
+
id="btn-center"
|
|
165
|
+
type="button"
|
|
166
|
+
class="ql-align"
|
|
167
|
+
value="center"
|
|
168
|
+
part="toolbar-button toolbar-button-align-center"
|
|
169
|
+
></button>
|
|
170
|
+
<vaadin-tooltip for="btn-center" .text="${this.i18n.alignCenter}"></vaadin-tooltip>
|
|
171
|
+
<button
|
|
172
|
+
id="btn-right"
|
|
173
|
+
type="button"
|
|
174
|
+
class="ql-align"
|
|
175
|
+
value="right"
|
|
176
|
+
part="toolbar-button toolbar-button-align-right"
|
|
177
|
+
></button>
|
|
178
|
+
<vaadin-tooltip for="btn-right" .text="${this.i18n.alignRight}"></vaadin-tooltip>
|
|
179
|
+
</span>
|
|
180
|
+
|
|
181
|
+
<span part="toolbar-group toolbar-group-rich-text">
|
|
182
|
+
<!-- Image -->
|
|
183
|
+
<button
|
|
184
|
+
id="btn-image"
|
|
185
|
+
type="button"
|
|
186
|
+
part="toolbar-button toolbar-button-image"
|
|
187
|
+
@touchend="${this._onImageTouchEnd}"
|
|
188
|
+
@click="${this._onImageClick}"
|
|
189
|
+
></button>
|
|
190
|
+
<vaadin-tooltip for="btn-image" .text="${this.i18n.image}"></vaadin-tooltip>
|
|
191
|
+
<!-- Link -->
|
|
192
|
+
<button
|
|
193
|
+
id="btn-link"
|
|
194
|
+
type="button"
|
|
195
|
+
part="toolbar-button toolbar-button-link"
|
|
196
|
+
@click="${this._onLinkClick}"
|
|
197
|
+
></button>
|
|
198
|
+
<vaadin-tooltip for="btn-link" .text="${this.i18n.link}"></vaadin-tooltip>
|
|
199
|
+
</span>
|
|
200
|
+
|
|
201
|
+
<span part="toolbar-group toolbar-group-block">
|
|
202
|
+
<!-- Blockquote -->
|
|
203
|
+
<button
|
|
204
|
+
id="btn-blockquote"
|
|
205
|
+
type="button"
|
|
206
|
+
class="ql-blockquote"
|
|
207
|
+
part="toolbar-button toolbar-button-blockquote"
|
|
208
|
+
></button>
|
|
209
|
+
<vaadin-tooltip for="btn-blockquote" .text="${this.i18n.blockquote}"></vaadin-tooltip>
|
|
210
|
+
<!-- Code block -->
|
|
211
|
+
<button
|
|
212
|
+
id="btn-code"
|
|
213
|
+
type="button"
|
|
214
|
+
class="ql-code-block"
|
|
215
|
+
part="toolbar-button toolbar-button-code-block"
|
|
216
|
+
></button>
|
|
217
|
+
<vaadin-tooltip for="btn-code" .text="${this.i18n.codeBlock}"></vaadin-tooltip>
|
|
218
|
+
</span>
|
|
219
|
+
|
|
220
|
+
<span part="toolbar-group toolbar-group-format">
|
|
221
|
+
<!-- Clean -->
|
|
222
|
+
<button id="btn-clean" type="button" class="ql-clean" part="toolbar-button toolbar-button-clean"></button>
|
|
223
|
+
<vaadin-tooltip for="btn-clean" .text="${this.i18n.clean}"></vaadin-tooltip>
|
|
224
|
+
</span>
|
|
225
|
+
|
|
226
|
+
<input
|
|
227
|
+
id="fileInput"
|
|
228
|
+
type="file"
|
|
229
|
+
accept="image/png, image/gif, image/jpeg, image/bmp, image/x-icon"
|
|
230
|
+
@change="${this._uploadImage}"
|
|
231
|
+
/>
|
|
232
|
+
</div>
|
|
233
|
+
|
|
234
|
+
<div part="content"></div>
|
|
235
|
+
|
|
236
|
+
<div class="announcer" aria-live="polite"></div>
|
|
237
|
+
</div>
|
|
238
|
+
|
|
239
|
+
<vaadin-confirm-dialog
|
|
240
|
+
id="linkDialog"
|
|
241
|
+
.opened="${this._linkEditing}"
|
|
242
|
+
.header="${this.i18n.linkDialogTitle}"
|
|
243
|
+
@opened-changed="${this._onLinkEditingChanged}"
|
|
244
|
+
>
|
|
245
|
+
<vaadin-text-field
|
|
246
|
+
id="linkUrl"
|
|
247
|
+
.value="${this._linkUrl}"
|
|
248
|
+
style="width: 100%;"
|
|
249
|
+
@keydown="${this._onLinkKeydown}"
|
|
250
|
+
@value-changed="${this._onLinkUrlChanged}"
|
|
251
|
+
></vaadin-text-field>
|
|
252
|
+
<vaadin-button id="confirmLink" slot="confirm-button" theme="primary" @click="${this._onLinkEditConfirm}">
|
|
253
|
+
${this.i18n.ok}
|
|
254
|
+
</vaadin-button>
|
|
255
|
+
<vaadin-button
|
|
256
|
+
id="removeLink"
|
|
257
|
+
slot="reject-button"
|
|
258
|
+
theme="error"
|
|
259
|
+
@click="${this._onLinkEditRemove}"
|
|
260
|
+
?hidden="${!this._linkRange}"
|
|
261
|
+
>
|
|
262
|
+
${this.i18n.remove}
|
|
263
|
+
</vaadin-button>
|
|
264
|
+
<vaadin-button id="cancelLink" slot="cancel-button" @click="${this._onLinkEditCancel}">
|
|
265
|
+
${this.i18n.cancel}
|
|
266
|
+
</vaadin-button>
|
|
267
|
+
</vaadin-confirm-dialog>
|
|
268
|
+
`;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/** @private */
|
|
272
|
+
_onLinkEditingChanged(event) {
|
|
273
|
+
this._linkEditing = event.detail.value;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/** @private */
|
|
277
|
+
_onLinkUrlChanged(event) {
|
|
278
|
+
this._linkUrl = event.detail.value;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
defineCustomElement(RichTextEditor);
|
|
283
|
+
|
|
284
|
+
export { RichTextEditor };
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2000 - 2023 Vaadin Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
|
+
* license.
|
|
10
|
+
*/
|
|
11
|
+
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
12
|
+
|
|
13
|
+
export interface RichTextEditorI18n {
|
|
14
|
+
undo: string;
|
|
15
|
+
redo: string;
|
|
16
|
+
bold: string;
|
|
17
|
+
italic: string;
|
|
18
|
+
underline: string;
|
|
19
|
+
strike: string;
|
|
20
|
+
h1: string;
|
|
21
|
+
h2: string;
|
|
22
|
+
h3: string;
|
|
23
|
+
subscript: string;
|
|
24
|
+
superscript: string;
|
|
25
|
+
listOrdered: string;
|
|
26
|
+
listBullet: string;
|
|
27
|
+
alignLeft: string;
|
|
28
|
+
alignCenter: string;
|
|
29
|
+
alignRight: string;
|
|
30
|
+
image: string;
|
|
31
|
+
link: string;
|
|
32
|
+
blockquote: string;
|
|
33
|
+
codeBlock: string;
|
|
34
|
+
clean: string;
|
|
35
|
+
linkDialogTitle: string;
|
|
36
|
+
ok: string;
|
|
37
|
+
cancel: string;
|
|
38
|
+
remove: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Fired when the `htmlValue` property changes.
|
|
43
|
+
*/
|
|
44
|
+
export type RichTextEditorHtmlValueChangedEvent = CustomEvent<{ value: string }>;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Fired when the `value` property changes.
|
|
48
|
+
*/
|
|
49
|
+
export type RichTextEditorValueChangedEvent = CustomEvent<{ value: string }>;
|
|
50
|
+
|
|
51
|
+
export interface RichTextEditorCustomEventMap {
|
|
52
|
+
'html-value-changed': RichTextEditorHtmlValueChangedEvent;
|
|
53
|
+
|
|
54
|
+
'value-changed': RichTextEditorValueChangedEvent;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export declare function RichTextEditorMixin<T extends Constructor<HTMLElement>>(
|
|
58
|
+
base: T,
|
|
59
|
+
): Constructor<RichTextEditorMixinClass> & T;
|
|
60
|
+
|
|
61
|
+
export declare class RichTextEditorMixinClass {
|
|
62
|
+
/**
|
|
63
|
+
* Value is a list of the operations which describe change to the document.
|
|
64
|
+
* Each of those operations describe the change at the current index.
|
|
65
|
+
* They can be an `insert`, `delete` or `retain`. The format is as follows:
|
|
66
|
+
*
|
|
67
|
+
* ```js
|
|
68
|
+
* [
|
|
69
|
+
* { insert: 'Hello World' },
|
|
70
|
+
* { insert: '!', attributes: { bold: true }}
|
|
71
|
+
* ]
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* See also https://github.com/quilljs/delta for detailed documentation.
|
|
75
|
+
*/
|
|
76
|
+
value: string;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* HTML representation of the rich text editor content.
|
|
80
|
+
*/
|
|
81
|
+
readonly htmlValue: string | null | undefined;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* When true, the user can not modify, nor copy the editor content.
|
|
85
|
+
*/
|
|
86
|
+
disabled: boolean;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* When true, the user can not modify the editor content, but can copy it.
|
|
90
|
+
*/
|
|
91
|
+
readonly: boolean;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* An object used to localize this component. The properties are used
|
|
95
|
+
* e.g. as the tooltips for the editor toolbar buttons.
|
|
96
|
+
*/
|
|
97
|
+
i18n: RichTextEditorI18n;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Sets content represented by HTML snippet into the editor.
|
|
101
|
+
* The snippet is interpreted by [Quill's Clipboard matchers](https://quilljs.com/docs/modules/clipboard/#matchers),
|
|
102
|
+
* which may not produce the exactly input HTML.
|
|
103
|
+
*
|
|
104
|
+
* **NOTE:** Improper handling of HTML can lead to cross site scripting (XSS) and failure to sanitize
|
|
105
|
+
* properly is both notoriously error-prone and a leading cause of web vulnerabilities.
|
|
106
|
+
* This method is aptly named to ensure the developer has taken the necessary precautions.
|
|
107
|
+
*/
|
|
108
|
+
dangerouslySetHtmlValue(htmlValue: string): void;
|
|
109
|
+
}
|