@vaadin/rich-text-editor 24.4.0-dev.223e39f050 → 24.4.0-dev.4b20a0c55

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/README.md CHANGED
@@ -7,7 +7,6 @@ An input field web component for entering rich text.
7
7
  [Documentation + Live Demo ↗](https://vaadin.com/docs/latest/components/rich-text-editor)
8
8
 
9
9
  [![npm version](https://badgen.net/npm/v/@vaadin/rich-text-editor)](https://www.npmjs.com/package/@vaadin/rich-text-editor)
10
- [![Discord](https://img.shields.io/discord/732335336448852018?label=discord)](https://discord.gg/PHmkCKC)
11
10
 
12
11
  ```html
13
12
  <vaadin-rich-text-editor></vaadin-rich-text-editor>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/rich-text-editor",
3
- "version": "24.4.0-dev.223e39f050",
3
+ "version": "24.4.0-dev.4b20a0c55",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -41,19 +41,19 @@
41
41
  "dependencies": {
42
42
  "@open-wc/dedupe-mixin": "^1.3.0",
43
43
  "@polymer/polymer": "^3.0.0",
44
- "@vaadin/button": "24.4.0-dev.223e39f050",
45
- "@vaadin/component-base": "24.4.0-dev.223e39f050",
46
- "@vaadin/confirm-dialog": "24.4.0-dev.223e39f050",
47
- "@vaadin/text-field": "24.4.0-dev.223e39f050",
48
- "@vaadin/tooltip": "24.4.0-dev.223e39f050",
49
- "@vaadin/vaadin-lumo-styles": "24.4.0-dev.223e39f050",
50
- "@vaadin/vaadin-material-styles": "24.4.0-dev.223e39f050",
51
- "@vaadin/vaadin-themable-mixin": "24.4.0-dev.223e39f050",
44
+ "@vaadin/button": "24.4.0-dev.4b20a0c55",
45
+ "@vaadin/component-base": "24.4.0-dev.4b20a0c55",
46
+ "@vaadin/confirm-dialog": "24.4.0-dev.4b20a0c55",
47
+ "@vaadin/text-field": "24.4.0-dev.4b20a0c55",
48
+ "@vaadin/tooltip": "24.4.0-dev.4b20a0c55",
49
+ "@vaadin/vaadin-lumo-styles": "24.4.0-dev.4b20a0c55",
50
+ "@vaadin/vaadin-material-styles": "24.4.0-dev.4b20a0c55",
51
+ "@vaadin/vaadin-themable-mixin": "24.4.0-dev.4b20a0c55",
52
52
  "lit": "^3.0.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@esm-bundle/chai": "^4.3.4",
56
- "@vaadin/a11y-base": "24.4.0-dev.223e39f050",
56
+ "@vaadin/a11y-base": "24.4.0-dev.4b20a0c55",
57
57
  "@vaadin/testing-helpers": "^0.6.0",
58
58
  "gulp": "^4.0.2",
59
59
  "gulp-cli": "^2.3.0",
@@ -65,5 +65,5 @@
65
65
  "web-types.json",
66
66
  "web-types.lit.json"
67
67
  ],
68
- "gitHead": "5e2e3bfc811c95aed9354235fab93fdbf43eb354"
68
+ "gitHead": "b79c81e5f6fd24684b34ee0dc434e94d943ea13e"
69
69
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -25,7 +25,7 @@ import { richTextEditorStyles } from './vaadin-rich-text-editor-styles.js';
25
25
  *
26
26
  * ## Disclaimer
27
27
  *
28
- * This component is an experiment not intended for publishing to npm.
28
+ * This component is an experiment and not yet a part of Vaadin platform.
29
29
  * There is no ETA regarding specific Vaadin version where it'll land.
30
30
  */
31
31
  class RichTextEditor extends RichTextEditorMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -345,8 +345,9 @@ export const RichTextEditorMixin = (superClass) =>
345
345
  });
346
346
 
347
347
  editorContent.addEventListener('focus', () => {
348
- // Format changed, but no value changed happened
349
- if (this._toolbarState === STATE.CLICKED) {
348
+ // When editing link, editor gets focus while dialog is still open.
349
+ // Keep toolbar state as clicked in this case to fire change event.
350
+ if (this._toolbarState === STATE.CLICKED && !this._linkEditing) {
350
351
  this._cleanToolbarState();
351
352
  }
352
353
  });
@@ -673,7 +674,12 @@ export const RichTextEditorMixin = (superClass) =>
673
674
  let content = editor.innerHTML;
674
675
 
675
676
  // Remove Quill classes, e.g. ql-syntax, except for align
676
- content = content.replace(/\s*ql-(?!align)[\w-]*\s*/gu, '');
677
+ content = content.replace(/class="([^"]*)"/gu, (match, group1) => {
678
+ const classes = group1.split(' ').filter((className) => {
679
+ return !className.startsWith('ql-') || className.startsWith('ql-align');
680
+ });
681
+ return `class="${classes.join(' ')}"`;
682
+ });
677
683
  // Remove meta spans, e.g. cursor which are empty after Quill classes removed
678
684
  content = content.replace(/<\/?span[^>]*>/gu, '');
679
685
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2000 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2000 - 2024 Vaadin Ltd.
4
4
  *
5
5
  * This program is available under Vaadin Commercial License and Service Terms.
6
6
  *