@vaadin/rich-text-editor 24.8.5 → 24.9.0-alpha1
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 +14 -14
- package/src/vaadin-rich-text-editor.d.ts +1 -1
- package/src/vaadin-rich-text-editor.js +1 -1
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
- package/src/vaadin-lit-rich-text-editor-popup.js +0 -91
- package/src/vaadin-lit-rich-text-editor.js +0 -330
- package/theme/lumo/vaadin-lit-rich-text-editor.d.ts +0 -6
- package/theme/lumo/vaadin-lit-rich-text-editor.js +0 -6
- package/theme/material/vaadin-lit-rich-text-editor.d.ts +0 -6
- package/theme/material/vaadin-lit-rich-text-editor.js +0 -6
- package/vaadin-lit-rich-text-editor.d.ts +0 -1
- package/vaadin-lit-rich-text-editor.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/rich-text-editor",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.9.0-alpha1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -41,21 +41,21 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
43
43
|
"@polymer/polymer": "^3.0.0",
|
|
44
|
-
"@vaadin/button": "
|
|
45
|
-
"@vaadin/component-base": "
|
|
46
|
-
"@vaadin/confirm-dialog": "
|
|
47
|
-
"@vaadin/overlay": "
|
|
48
|
-
"@vaadin/text-field": "
|
|
49
|
-
"@vaadin/tooltip": "
|
|
50
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
51
|
-
"@vaadin/vaadin-material-styles": "
|
|
52
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
44
|
+
"@vaadin/button": "24.9.0-alpha1",
|
|
45
|
+
"@vaadin/component-base": "24.9.0-alpha1",
|
|
46
|
+
"@vaadin/confirm-dialog": "24.9.0-alpha1",
|
|
47
|
+
"@vaadin/overlay": "24.9.0-alpha1",
|
|
48
|
+
"@vaadin/text-field": "24.9.0-alpha1",
|
|
49
|
+
"@vaadin/tooltip": "24.9.0-alpha1",
|
|
50
|
+
"@vaadin/vaadin-lumo-styles": "24.9.0-alpha1",
|
|
51
|
+
"@vaadin/vaadin-material-styles": "24.9.0-alpha1",
|
|
52
|
+
"@vaadin/vaadin-themable-mixin": "24.9.0-alpha1",
|
|
53
53
|
"lit": "^3.0.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@vaadin/a11y-base": "
|
|
57
|
-
"@vaadin/chai-plugins": "
|
|
58
|
-
"@vaadin/test-runner-commands": "
|
|
56
|
+
"@vaadin/a11y-base": "24.9.0-alpha1",
|
|
57
|
+
"@vaadin/chai-plugins": "24.9.0-alpha1",
|
|
58
|
+
"@vaadin/test-runner-commands": "24.9.0-alpha1",
|
|
59
59
|
"@vaadin/testing-helpers": "^1.1.0",
|
|
60
60
|
"gulp": "^5.0.0",
|
|
61
61
|
"gulp-cli": "^3.0.0",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"web-types.json",
|
|
68
68
|
"web-types.lit.json"
|
|
69
69
|
],
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "cc13d59f0e3cd1a3b0c19c1a900a5308446fe7ac"
|
|
71
71
|
}
|
|
@@ -59,7 +59,7 @@ export interface RichTextEditorEventMap extends HTMLElementEventMap, RichTextEdi
|
|
|
59
59
|
* `toolbar-group-heading` | The group for heading controls
|
|
60
60
|
* `toolbar-group-style` | The group for style controls
|
|
61
61
|
* `toolbar-group-glyph-transformation` | The group for glyph transformation controls
|
|
62
|
-
* `toolbar-group-
|
|
62
|
+
* `toolbar-group-list` | The group for list controls
|
|
63
63
|
* `toolbar-group-alignment` | The group for alignment controls
|
|
64
64
|
* `toolbar-group-rich-text` | The group for rich text controls
|
|
65
65
|
* `toolbar-group-block` | The group for preformatted block controls
|
|
@@ -58,7 +58,7 @@ registerStyles('vaadin-rich-text-editor', richTextEditorStyles, { moduleId: 'vaa
|
|
|
58
58
|
* `toolbar-group-heading` | The group for heading controls
|
|
59
59
|
* `toolbar-group-style` | The group for style controls
|
|
60
60
|
* `toolbar-group-glyph-transformation` | The group for glyph transformation controls
|
|
61
|
-
* `toolbar-group-
|
|
61
|
+
* `toolbar-group-list` | The group for list controls
|
|
62
62
|
* `toolbar-group-alignment` | The group for alignment controls
|
|
63
63
|
* `toolbar-group-rich-text` | The group for rich text controls
|
|
64
64
|
* `toolbar-group-block` | The group for preformatted block controls
|
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/rich-text-editor",
|
|
4
|
-
"version": "24.
|
|
4
|
+
"version": "24.9.0-alpha1",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-rich-text-editor",
|
|
11
|
-
"description": "`<vaadin-rich-text-editor>` is a Web Component for rich text editing.\nIt provides a set of toolbar controls to apply formatting on the content,\nwhich is stored and can be accessed as HTML5 or JSON string.\n\n```\n<vaadin-rich-text-editor></vaadin-rich-text-editor>\n```\n\nVaadin Rich Text Editor focuses on the structure, not the styling of content.\nTherefore, the semantic HTML5 tags such as <h1>, <strong> and <ul> are used,\nand CSS usage is limited to most common cases, like horizontal text alignment.\n\n### Styling\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-------------|-------------|------------\n`disabled` | Set to a disabled text editor | :host\n`readonly` | Set to a readonly text editor | :host\n`on` | Set to a toolbar button applied to the selected text | toolbar-button\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-------------------------------------|----------------\n`content` | The content wrapper\n`toolbar` | The toolbar wrapper\n`toolbar-group` | The group for toolbar controls\n`toolbar-group-history` | The group for histroy controls\n`toolbar-group-emphasis` | The group for emphasis controls\n`toolbar-group-heading` | The group for heading controls\n`toolbar-group-style` | The group for style controls\n`toolbar-group-glyph-transformation` | The group for glyph transformation controls\n`toolbar-group-
|
|
11
|
+
"description": "`<vaadin-rich-text-editor>` is a Web Component for rich text editing.\nIt provides a set of toolbar controls to apply formatting on the content,\nwhich is stored and can be accessed as HTML5 or JSON string.\n\n```\n<vaadin-rich-text-editor></vaadin-rich-text-editor>\n```\n\nVaadin Rich Text Editor focuses on the structure, not the styling of content.\nTherefore, the semantic HTML5 tags such as <h1>, <strong> and <ul> are used,\nand CSS usage is limited to most common cases, like horizontal text alignment.\n\n### Styling\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-------------|-------------|------------\n`disabled` | Set to a disabled text editor | :host\n`readonly` | Set to a readonly text editor | :host\n`on` | Set to a toolbar button applied to the selected text | toolbar-button\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-------------------------------------|----------------\n`content` | The content wrapper\n`toolbar` | The toolbar wrapper\n`toolbar-group` | The group for toolbar controls\n`toolbar-group-history` | The group for histroy controls\n`toolbar-group-emphasis` | The group for emphasis controls\n`toolbar-group-heading` | The group for heading controls\n`toolbar-group-style` | The group for style controls\n`toolbar-group-glyph-transformation` | The group for glyph transformation controls\n`toolbar-group-list` | The group for list controls\n`toolbar-group-alignment` | The group for alignment controls\n`toolbar-group-rich-text` | The group for rich text controls\n`toolbar-group-block` | The group for preformatted block controls\n`toolbar-group-format` | The group for format controls\n`toolbar-button` | The toolbar button (applies to all buttons)\n`toolbar-button-pressed` | The toolbar button in pressed state (applies to all buttons)\n`toolbar-button-undo` | The \"undo\" button\n`toolbar-button-redo` | The \"redo\" button\n`toolbar-button-bold` | The \"bold\" button\n`toolbar-button-italic` | The \"italic\" button\n`toolbar-button-underline` | The \"underline\" button\n`toolbar-button-strike` | The \"strike-through\" button\n`toolbar-button-color` | The \"color\" button\n`toolbar-button-background` | The \"background\" button\n`toolbar-button-h1` | The \"header 1\" button\n`toolbar-button-h2` | The \"header 2\" button\n`toolbar-button-h3` | The \"header 3\" button\n`toolbar-button-subscript` | The \"subscript\" button\n`toolbar-button-superscript` | The \"superscript\" button\n`toolbar-button-list-ordered` | The \"ordered list\" button\n`toolbar-button-list-bullet` | The \"bullet list\" button\n`toolbar-button-align-left` | The \"left align\" button\n`toolbar-button-align-center` | The \"center align\" button\n`toolbar-button-align-right` | The \"right align\" button\n`toolbar-button-image` | The \"image\" button\n`toolbar-button-link` | The \"link\" button\n`toolbar-button-blockquote` | The \"blockquote\" button\n`toolbar-button-code-block` | The \"code block\" button\n`toolbar-button-clean` | The \"clean formatting\" button\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "value",
|
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": "24.
|
|
4
|
+
"version": "24.9.0-alpha1",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"elements": [
|
|
17
17
|
{
|
|
18
18
|
"name": "vaadin-rich-text-editor",
|
|
19
|
-
"description": "`<vaadin-rich-text-editor>` is a Web Component for rich text editing.\nIt provides a set of toolbar controls to apply formatting on the content,\nwhich is stored and can be accessed as HTML5 or JSON string.\n\n```\n<vaadin-rich-text-editor></vaadin-rich-text-editor>\n```\n\nVaadin Rich Text Editor focuses on the structure, not the styling of content.\nTherefore, the semantic HTML5 tags such as <h1>, <strong> and <ul> are used,\nand CSS usage is limited to most common cases, like horizontal text alignment.\n\n### Styling\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-------------|-------------|------------\n`disabled` | Set to a disabled text editor | :host\n`readonly` | Set to a readonly text editor | :host\n`on` | Set to a toolbar button applied to the selected text | toolbar-button\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-------------------------------------|----------------\n`content` | The content wrapper\n`toolbar` | The toolbar wrapper\n`toolbar-group` | The group for toolbar controls\n`toolbar-group-history` | The group for histroy controls\n`toolbar-group-emphasis` | The group for emphasis controls\n`toolbar-group-heading` | The group for heading controls\n`toolbar-group-style` | The group for style controls\n`toolbar-group-glyph-transformation` | The group for glyph transformation controls\n`toolbar-group-
|
|
19
|
+
"description": "`<vaadin-rich-text-editor>` is a Web Component for rich text editing.\nIt provides a set of toolbar controls to apply formatting on the content,\nwhich is stored and can be accessed as HTML5 or JSON string.\n\n```\n<vaadin-rich-text-editor></vaadin-rich-text-editor>\n```\n\nVaadin Rich Text Editor focuses on the structure, not the styling of content.\nTherefore, the semantic HTML5 tags such as <h1>, <strong> and <ul> are used,\nand CSS usage is limited to most common cases, like horizontal text alignment.\n\n### Styling\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n-------------|-------------|------------\n`disabled` | Set to a disabled text editor | :host\n`readonly` | Set to a readonly text editor | :host\n`on` | Set to a toolbar button applied to the selected text | toolbar-button\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-------------------------------------|----------------\n`content` | The content wrapper\n`toolbar` | The toolbar wrapper\n`toolbar-group` | The group for toolbar controls\n`toolbar-group-history` | The group for histroy controls\n`toolbar-group-emphasis` | The group for emphasis controls\n`toolbar-group-heading` | The group for heading controls\n`toolbar-group-style` | The group for style controls\n`toolbar-group-glyph-transformation` | The group for glyph transformation controls\n`toolbar-group-list` | The group for list controls\n`toolbar-group-alignment` | The group for alignment controls\n`toolbar-group-rich-text` | The group for rich text controls\n`toolbar-group-block` | The group for preformatted block controls\n`toolbar-group-format` | The group for format controls\n`toolbar-button` | The toolbar button (applies to all buttons)\n`toolbar-button-pressed` | The toolbar button in pressed state (applies to all buttons)\n`toolbar-button-undo` | The \"undo\" button\n`toolbar-button-redo` | The \"redo\" button\n`toolbar-button-bold` | The \"bold\" button\n`toolbar-button-italic` | The \"italic\" button\n`toolbar-button-underline` | The \"underline\" button\n`toolbar-button-strike` | The \"strike-through\" button\n`toolbar-button-color` | The \"color\" button\n`toolbar-button-background` | The \"background\" button\n`toolbar-button-h1` | The \"header 1\" button\n`toolbar-button-h2` | The \"header 2\" button\n`toolbar-button-h3` | The \"header 3\" button\n`toolbar-button-subscript` | The \"subscript\" button\n`toolbar-button-superscript` | The \"superscript\" button\n`toolbar-button-list-ordered` | The \"ordered list\" button\n`toolbar-button-list-bullet` | The \"bullet list\" button\n`toolbar-button-align-left` | The \"left align\" button\n`toolbar-button-align-center` | The \"center align\" button\n`toolbar-button-align-right` | The \"right align\" button\n`toolbar-button-image` | The \"image\" button\n`toolbar-button-link` | The \"link\" button\n`toolbar-button-blockquote` | The \"blockquote\" button\n`toolbar-button-code-block` | The \"code block\" button\n`toolbar-button-clean` | The \"clean formatting\" button\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2000 - 2025 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 { css, html, LitElement } from 'lit';
|
|
12
|
-
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
13
|
-
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
14
|
-
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
15
|
-
import { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';
|
|
16
|
-
import { PositionMixin } from '@vaadin/overlay/src/vaadin-overlay-position-mixin.js';
|
|
17
|
-
import { overlayStyles } from '@vaadin/overlay/src/vaadin-overlay-styles.js';
|
|
18
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
19
|
-
import { RichTextEditorPopupMixin } from './vaadin-rich-text-editor-popup-mixin.js';
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* An element used internally by `<vaadin-rich-text-editor>`. Not intended to be used separately.
|
|
23
|
-
* @private
|
|
24
|
-
*/
|
|
25
|
-
class RichTextEditorPopup extends RichTextEditorPopupMixin(PolylitMixin(LitElement)) {
|
|
26
|
-
static get is() {
|
|
27
|
-
return 'vaadin-rich-text-editor-popup';
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
static get styles() {
|
|
31
|
-
return css`
|
|
32
|
-
:host {
|
|
33
|
-
display: none;
|
|
34
|
-
}
|
|
35
|
-
`;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/** @protected */
|
|
39
|
-
render() {
|
|
40
|
-
return html`
|
|
41
|
-
<vaadin-rich-text-editor-popup-overlay
|
|
42
|
-
.renderer="${this.renderer}"
|
|
43
|
-
.opened="${this.opened}"
|
|
44
|
-
.positionTarget="${this.target}"
|
|
45
|
-
no-vertical-overlap
|
|
46
|
-
horizontal-align="start"
|
|
47
|
-
vertical-align="top"
|
|
48
|
-
focus-trap
|
|
49
|
-
@opened-changed="${this._onOpenedChanged}"
|
|
50
|
-
@vaadin-overlay-escape-press="${this._onOverlayEscapePress}"
|
|
51
|
-
></vaadin-rich-text-editor-popup-overlay>
|
|
52
|
-
`;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/** @private */
|
|
56
|
-
_onOpenedChanged(event) {
|
|
57
|
-
this.opened = event.detail.value;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
defineCustomElement(RichTextEditorPopup);
|
|
62
|
-
|
|
63
|
-
export { RichTextEditorPopup };
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* An element used internally by `<vaadin-rich-text-editor>`. Not intended to be used separately.
|
|
67
|
-
* @private
|
|
68
|
-
*/
|
|
69
|
-
class RichTextEditorPopupOverlay extends PositionMixin(
|
|
70
|
-
OverlayMixin(DirMixin(ThemableMixin(PolylitMixin(LitElement)))),
|
|
71
|
-
) {
|
|
72
|
-
static get is() {
|
|
73
|
-
return 'vaadin-rich-text-editor-popup-overlay';
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
static get styles() {
|
|
77
|
-
return overlayStyles;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/** @protected */
|
|
81
|
-
render() {
|
|
82
|
-
return html`
|
|
83
|
-
<div id="backdrop" part="backdrop" hidden></div>
|
|
84
|
-
<div part="overlay" id="overlay">
|
|
85
|
-
<div part="content" id="content"><slot></slot></div>
|
|
86
|
-
</div>
|
|
87
|
-
`;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
defineCustomElement(RichTextEditorPopupOverlay);
|
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2000 - 2025 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 './vaadin-lit-rich-text-editor-popup.js';
|
|
16
|
-
import { html, LitElement } from 'lit';
|
|
17
|
-
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
18
|
-
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
19
|
-
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
20
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
21
|
-
import { RichTextEditorMixin } from './vaadin-rich-text-editor-mixin.js';
|
|
22
|
-
import { richTextEditorStyles } from './vaadin-rich-text-editor-styles.js';
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* LitElement based version of `<vaadin-rich-text-editor>` web component.
|
|
26
|
-
*
|
|
27
|
-
* ## Disclaimer
|
|
28
|
-
*
|
|
29
|
-
* This component is an experiment and not yet a part of Vaadin platform.
|
|
30
|
-
* There is no ETA regarding specific Vaadin version where it'll land.
|
|
31
|
-
*/
|
|
32
|
-
class RichTextEditor extends RichTextEditorMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
|
|
33
|
-
static get is() {
|
|
34
|
-
return 'vaadin-rich-text-editor';
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
static get cvdlName() {
|
|
38
|
-
return 'vaadin-rich-text-editor';
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
static get styles() {
|
|
42
|
-
return richTextEditorStyles;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/** @protected */
|
|
46
|
-
render() {
|
|
47
|
-
return html`
|
|
48
|
-
<div class="vaadin-rich-text-editor-container">
|
|
49
|
-
<!-- Create toolbar container -->
|
|
50
|
-
<div part="toolbar" role="toolbar">
|
|
51
|
-
<span part="toolbar-group toolbar-group-history">
|
|
52
|
-
<!-- Undo and Redo -->
|
|
53
|
-
<button
|
|
54
|
-
id="btn-undo"
|
|
55
|
-
type="button"
|
|
56
|
-
part="toolbar-button toolbar-button-undo"
|
|
57
|
-
@click="${this._undo}"
|
|
58
|
-
></button>
|
|
59
|
-
<vaadin-tooltip for="btn-undo" .text="${this.__effectiveI18n.undo}"></vaadin-tooltip>
|
|
60
|
-
|
|
61
|
-
<button
|
|
62
|
-
id="btn-redo"
|
|
63
|
-
type="button"
|
|
64
|
-
part="toolbar-button toolbar-button-redo"
|
|
65
|
-
@click="${this._redo}"
|
|
66
|
-
></button>
|
|
67
|
-
<vaadin-tooltip for="btn-redo" .text="${this.__effectiveI18n.redo}"></vaadin-tooltip>
|
|
68
|
-
</span>
|
|
69
|
-
|
|
70
|
-
<span part="toolbar-group toolbar-group-emphasis">
|
|
71
|
-
<!-- Bold -->
|
|
72
|
-
<button id="btn-bold" class="ql-bold" part="toolbar-button toolbar-button-bold"></button>
|
|
73
|
-
<vaadin-tooltip for="btn-bold" .text="${this.__effectiveI18n.bold}"></vaadin-tooltip>
|
|
74
|
-
|
|
75
|
-
<!-- Italic -->
|
|
76
|
-
<button id="btn-italic" class="ql-italic" part="toolbar-button toolbar-button-italic"></button>
|
|
77
|
-
<vaadin-tooltip for="btn-italic" .text="${this.__effectiveI18n.italic}"></vaadin-tooltip>
|
|
78
|
-
|
|
79
|
-
<!-- Underline -->
|
|
80
|
-
<button id="btn-underline" class="ql-underline" part="toolbar-button toolbar-button-underline"></button>
|
|
81
|
-
<vaadin-tooltip for="btn-underline" .text="${this.__effectiveI18n.underline}"></vaadin-tooltip>
|
|
82
|
-
|
|
83
|
-
<!-- Strike -->
|
|
84
|
-
<button id="btn-strike" class="ql-strike" part="toolbar-button toolbar-button-strike"></button>
|
|
85
|
-
<vaadin-tooltip for="btn-strike" .text="${this.__effectiveI18n.strike}"></vaadin-tooltip>
|
|
86
|
-
</span>
|
|
87
|
-
|
|
88
|
-
<span part="toolbar-group toolbar-group-style">
|
|
89
|
-
<!-- Color -->
|
|
90
|
-
<button
|
|
91
|
-
id="btn-color"
|
|
92
|
-
type="button"
|
|
93
|
-
part="toolbar-button toolbar-button-color"
|
|
94
|
-
@click="${this.__onColorClick}"
|
|
95
|
-
></button>
|
|
96
|
-
<vaadin-tooltip for="btn-color" .text="${this.__effectiveI18n.color}"></vaadin-tooltip>
|
|
97
|
-
<!-- Background -->
|
|
98
|
-
<button
|
|
99
|
-
id="btn-background"
|
|
100
|
-
type="button"
|
|
101
|
-
part="toolbar-button toolbar-button-background"
|
|
102
|
-
@click="${this.__onBackgroundClick}"
|
|
103
|
-
></button>
|
|
104
|
-
<vaadin-tooltip for="btn-background" .text="${this.__effectiveI18n.background}"></vaadin-tooltip>
|
|
105
|
-
</span>
|
|
106
|
-
|
|
107
|
-
<span part="toolbar-group toolbar-group-heading">
|
|
108
|
-
<!-- Header buttons -->
|
|
109
|
-
<button
|
|
110
|
-
id="btn-h1"
|
|
111
|
-
type="button"
|
|
112
|
-
class="ql-header"
|
|
113
|
-
value="1"
|
|
114
|
-
part="toolbar-button toolbar-button-h1"
|
|
115
|
-
></button>
|
|
116
|
-
<vaadin-tooltip for="btn-h1" .text="${this.__effectiveI18n.h1}"></vaadin-tooltip>
|
|
117
|
-
<button
|
|
118
|
-
id="btn-h2"
|
|
119
|
-
type="button"
|
|
120
|
-
class="ql-header"
|
|
121
|
-
value="2"
|
|
122
|
-
part="toolbar-button toolbar-button-h2"
|
|
123
|
-
></button>
|
|
124
|
-
<vaadin-tooltip for="btn-h2" .text="${this.__effectiveI18n.h2}"></vaadin-tooltip>
|
|
125
|
-
<button
|
|
126
|
-
id="btn-h3"
|
|
127
|
-
type="button"
|
|
128
|
-
class="ql-header"
|
|
129
|
-
value="3"
|
|
130
|
-
part="toolbar-button toolbar-button-h3"
|
|
131
|
-
></button>
|
|
132
|
-
<vaadin-tooltip for="btn-h3" .text="${this.__effectiveI18n.h3}"></vaadin-tooltip>
|
|
133
|
-
</span>
|
|
134
|
-
|
|
135
|
-
<span part="toolbar-group toolbar-group-glyph-transformation">
|
|
136
|
-
<!-- Subscript and superscript -->
|
|
137
|
-
<button
|
|
138
|
-
id="btn-subscript"
|
|
139
|
-
class="ql-script"
|
|
140
|
-
value="sub"
|
|
141
|
-
part="toolbar-button toolbar-button-subscript"
|
|
142
|
-
></button>
|
|
143
|
-
<vaadin-tooltip for="btn-subscript" .text="${this.__effectiveI18n.subscript}"></vaadin-tooltip>
|
|
144
|
-
<button
|
|
145
|
-
id="btn-superscript"
|
|
146
|
-
class="ql-script"
|
|
147
|
-
value="super"
|
|
148
|
-
part="toolbar-button toolbar-button-superscript"
|
|
149
|
-
></button>
|
|
150
|
-
<vaadin-tooltip for="btn-superscript" text="${this.__effectiveI18n.superscript}"></vaadin-tooltip>
|
|
151
|
-
</span>
|
|
152
|
-
|
|
153
|
-
<span part="toolbar-group toolbar-group-list">
|
|
154
|
-
<!-- List buttons -->
|
|
155
|
-
<button
|
|
156
|
-
id="btn-ol"
|
|
157
|
-
type="button"
|
|
158
|
-
class="ql-list"
|
|
159
|
-
value="ordered"
|
|
160
|
-
part="toolbar-button toolbar-button-list-ordered"
|
|
161
|
-
></button>
|
|
162
|
-
<vaadin-tooltip for="btn-ol" text="${this.__effectiveI18n.listOrdered}"></vaadin-tooltip>
|
|
163
|
-
<button
|
|
164
|
-
id="btn-ul"
|
|
165
|
-
type="button"
|
|
166
|
-
class="ql-list"
|
|
167
|
-
value="bullet"
|
|
168
|
-
part="toolbar-button toolbar-button-list-bullet"
|
|
169
|
-
></button>
|
|
170
|
-
<vaadin-tooltip for="btn-ul" text="${this.__effectiveI18n.listBullet}"></vaadin-tooltip>
|
|
171
|
-
</span>
|
|
172
|
-
|
|
173
|
-
<span part="toolbar-group toolbar-group-alignment">
|
|
174
|
-
<!-- Align buttons -->
|
|
175
|
-
<button
|
|
176
|
-
id="btn-left"
|
|
177
|
-
type="button"
|
|
178
|
-
class="ql-align"
|
|
179
|
-
value=""
|
|
180
|
-
part="toolbar-button toolbar-button-align-left"
|
|
181
|
-
></button>
|
|
182
|
-
<vaadin-tooltip for="btn-left" .text="${this.__effectiveI18n.alignLeft}"></vaadin-tooltip>
|
|
183
|
-
<button
|
|
184
|
-
id="btn-center"
|
|
185
|
-
type="button"
|
|
186
|
-
class="ql-align"
|
|
187
|
-
value="center"
|
|
188
|
-
part="toolbar-button toolbar-button-align-center"
|
|
189
|
-
></button>
|
|
190
|
-
<vaadin-tooltip for="btn-center" .text="${this.__effectiveI18n.alignCenter}"></vaadin-tooltip>
|
|
191
|
-
<button
|
|
192
|
-
id="btn-right"
|
|
193
|
-
type="button"
|
|
194
|
-
class="ql-align"
|
|
195
|
-
value="right"
|
|
196
|
-
part="toolbar-button toolbar-button-align-right"
|
|
197
|
-
></button>
|
|
198
|
-
<vaadin-tooltip for="btn-right" .text="${this.__effectiveI18n.alignRight}"></vaadin-tooltip>
|
|
199
|
-
</span>
|
|
200
|
-
|
|
201
|
-
<span part="toolbar-group toolbar-group-rich-text">
|
|
202
|
-
<!-- Image -->
|
|
203
|
-
<button
|
|
204
|
-
id="btn-image"
|
|
205
|
-
type="button"
|
|
206
|
-
part="toolbar-button toolbar-button-image"
|
|
207
|
-
@touchend="${this._onImageTouchEnd}"
|
|
208
|
-
@click="${this._onImageClick}"
|
|
209
|
-
></button>
|
|
210
|
-
<vaadin-tooltip for="btn-image" .text="${this.__effectiveI18n.image}"></vaadin-tooltip>
|
|
211
|
-
<!-- Link -->
|
|
212
|
-
<button
|
|
213
|
-
id="btn-link"
|
|
214
|
-
type="button"
|
|
215
|
-
part="toolbar-button toolbar-button-link"
|
|
216
|
-
@click="${this._onLinkClick}"
|
|
217
|
-
></button>
|
|
218
|
-
<vaadin-tooltip for="btn-link" .text="${this.__effectiveI18n.link}"></vaadin-tooltip>
|
|
219
|
-
</span>
|
|
220
|
-
|
|
221
|
-
<span part="toolbar-group toolbar-group-block">
|
|
222
|
-
<!-- Blockquote -->
|
|
223
|
-
<button
|
|
224
|
-
id="btn-blockquote"
|
|
225
|
-
type="button"
|
|
226
|
-
class="ql-blockquote"
|
|
227
|
-
part="toolbar-button toolbar-button-blockquote"
|
|
228
|
-
></button>
|
|
229
|
-
<vaadin-tooltip for="btn-blockquote" .text="${this.__effectiveI18n.blockquote}"></vaadin-tooltip>
|
|
230
|
-
<!-- Code block -->
|
|
231
|
-
<button
|
|
232
|
-
id="btn-code"
|
|
233
|
-
type="button"
|
|
234
|
-
class="ql-code-block"
|
|
235
|
-
part="toolbar-button toolbar-button-code-block"
|
|
236
|
-
></button>
|
|
237
|
-
<vaadin-tooltip for="btn-code" .text="${this.__effectiveI18n.codeBlock}"></vaadin-tooltip>
|
|
238
|
-
</span>
|
|
239
|
-
|
|
240
|
-
<span part="toolbar-group toolbar-group-format">
|
|
241
|
-
<!-- Clean -->
|
|
242
|
-
<button id="btn-clean" type="button" class="ql-clean" part="toolbar-button toolbar-button-clean"></button>
|
|
243
|
-
<vaadin-tooltip for="btn-clean" .text="${this.__effectiveI18n.clean}"></vaadin-tooltip>
|
|
244
|
-
</span>
|
|
245
|
-
|
|
246
|
-
<input
|
|
247
|
-
id="fileInput"
|
|
248
|
-
type="file"
|
|
249
|
-
accept="image/png, image/gif, image/jpeg, image/bmp, image/x-icon"
|
|
250
|
-
@change="${this._uploadImage}"
|
|
251
|
-
/>
|
|
252
|
-
</div>
|
|
253
|
-
|
|
254
|
-
<div part="content"></div>
|
|
255
|
-
|
|
256
|
-
<div class="announcer" aria-live="polite"></div>
|
|
257
|
-
</div>
|
|
258
|
-
|
|
259
|
-
<vaadin-confirm-dialog
|
|
260
|
-
id="linkDialog"
|
|
261
|
-
.opened="${this._linkEditing}"
|
|
262
|
-
.header="${this.__effectiveI18n.linkDialogTitle}"
|
|
263
|
-
@opened-changed="${this._onLinkEditingChanged}"
|
|
264
|
-
>
|
|
265
|
-
<vaadin-text-field
|
|
266
|
-
id="linkUrl"
|
|
267
|
-
.value="${this._linkUrl}"
|
|
268
|
-
style="width: 100%;"
|
|
269
|
-
@keydown="${this._onLinkKeydown}"
|
|
270
|
-
@value-changed="${this._onLinkUrlChanged}"
|
|
271
|
-
></vaadin-text-field>
|
|
272
|
-
<vaadin-button id="confirmLink" slot="confirm-button" theme="primary" @click="${this._onLinkEditConfirm}">
|
|
273
|
-
${this.__effectiveI18n.ok}
|
|
274
|
-
</vaadin-button>
|
|
275
|
-
<vaadin-button
|
|
276
|
-
id="removeLink"
|
|
277
|
-
slot="reject-button"
|
|
278
|
-
theme="error"
|
|
279
|
-
@click="${this._onLinkEditRemove}"
|
|
280
|
-
?hidden="${!this._linkRange}"
|
|
281
|
-
>
|
|
282
|
-
${this.__effectiveI18n.remove}
|
|
283
|
-
</vaadin-button>
|
|
284
|
-
<vaadin-button id="cancelLink" slot="cancel-button" @click="${this._onLinkEditCancel}">
|
|
285
|
-
${this.__effectiveI18n.cancel}
|
|
286
|
-
</vaadin-button>
|
|
287
|
-
</vaadin-confirm-dialog>
|
|
288
|
-
|
|
289
|
-
<vaadin-rich-text-editor-popup
|
|
290
|
-
id="colorPopup"
|
|
291
|
-
.colors="${this.colorOptions}"
|
|
292
|
-
.opened="${this._colorEditing}"
|
|
293
|
-
@color-selected="${this.__onColorSelected}"
|
|
294
|
-
@opened-changed="${this.__onColorEditingChanged}"
|
|
295
|
-
></vaadin-rich-text-editor-popup>
|
|
296
|
-
|
|
297
|
-
<vaadin-rich-text-editor-popup
|
|
298
|
-
id="backgroundPopup"
|
|
299
|
-
.colors="${this.colorOptions}"
|
|
300
|
-
.opened="${this._backgroundEditing}"
|
|
301
|
-
@color-selected="${this.__onBackgroundSelected}"
|
|
302
|
-
@opened-changed="${this.__onBackgroundEditingChanged}"
|
|
303
|
-
></vaadin-rich-text-editor-popup>
|
|
304
|
-
`;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
/** @private */
|
|
308
|
-
__onBackgroundEditingChanged(event) {
|
|
309
|
-
this._backgroundEditing = event.detail.value;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
/** @private */
|
|
313
|
-
__onColorEditingChanged(event) {
|
|
314
|
-
this._colorEditing = event.detail.value;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
/** @private */
|
|
318
|
-
_onLinkEditingChanged(event) {
|
|
319
|
-
this._linkEditing = event.detail.value;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
/** @private */
|
|
323
|
-
_onLinkUrlChanged(event) {
|
|
324
|
-
this._linkUrl = event.detail.value;
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
defineCustomElement(RichTextEditor);
|
|
329
|
-
|
|
330
|
-
export { RichTextEditor };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import '@vaadin/button/theme/lumo/vaadin-button-styles.js';
|
|
2
|
-
import '@vaadin/confirm-dialog/theme/lumo/vaadin-confirm-dialog-styles.js';
|
|
3
|
-
import '@vaadin/text-field/theme/lumo/vaadin-text-field-styles.js';
|
|
4
|
-
import '@vaadin/tooltip/theme/lumo/vaadin-tooltip-styles.js';
|
|
5
|
-
import './vaadin-rich-text-editor-styles.js';
|
|
6
|
-
import '../../src/vaadin-lit-rich-text-editor.js';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import '@vaadin/button/theme/lumo/vaadin-button-styles.js';
|
|
2
|
-
import '@vaadin/confirm-dialog/theme/lumo/vaadin-confirm-dialog-styles.js';
|
|
3
|
-
import '@vaadin/text-field/theme/lumo/vaadin-text-field-styles.js';
|
|
4
|
-
import '@vaadin/tooltip/theme/lumo/vaadin-tooltip-styles.js';
|
|
5
|
-
import './vaadin-rich-text-editor-styles.js';
|
|
6
|
-
import '../../src/vaadin-lit-rich-text-editor.js';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import '@vaadin/button/theme/material/vaadin-button-styles.js';
|
|
2
|
-
import '@vaadin/confirm-dialog/theme/material/vaadin-confirm-dialog-styles.js';
|
|
3
|
-
import '@vaadin/text-field/theme/material/vaadin-text-field-styles.js';
|
|
4
|
-
import '@vaadin/tooltip/theme/material/vaadin-tooltip-styles.js';
|
|
5
|
-
import './vaadin-rich-text-editor-styles.js';
|
|
6
|
-
import '../../src/vaadin-lit-rich-text-editor.js';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import '@vaadin/button/theme/material/vaadin-button-styles.js';
|
|
2
|
-
import '@vaadin/confirm-dialog/theme/material/vaadin-confirm-dialog-styles.js';
|
|
3
|
-
import '@vaadin/text-field/theme/material/vaadin-text-field-styles.js';
|
|
4
|
-
import '@vaadin/tooltip/theme/material/vaadin-tooltip-styles.js';
|
|
5
|
-
import './vaadin-rich-text-editor-styles.js';
|
|
6
|
-
import '../../src/vaadin-lit-rich-text-editor.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/vaadin-rich-text-editor.js';
|