@contentful/field-editor-rich-text 1.0.8 → 1.1.3

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/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.1.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@1.1.2...@contentful/field-editor-rich-text@1.1.3) (2022-02-15)
7
+
8
+ ### Bug Fixes
9
+
10
+ - bump f36 packages ([#1025](https://github.com/contentful/field-editors/issues/1025)) ([ec37a40](https://github.com/contentful/field-editors/commit/ec37a4000db7cd75c66dd9621136b2272c9feeea))
11
+
12
+ ## [1.1.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@1.1.1...@contentful/field-editor-rich-text@1.1.2) (2022-02-14)
13
+
14
+ **Note:** Version bump only for package @contentful/field-editor-rich-text
15
+
16
+ ## [1.1.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@1.1.0...@contentful/field-editor-rich-text@1.1.1) (2022-01-20)
17
+
18
+ ### Bug Fixes
19
+
20
+ - remove empty text hyperlinks ([#997](https://github.com/contentful/field-editors/issues/997)) ([d998132](https://github.com/contentful/field-editors/commit/d998132fbe948a98f6e800211a794bdd1e292233))
21
+
22
+ # [1.1.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@1.0.8...@contentful/field-editor-rich-text@1.1.0) (2022-01-11)
23
+
24
+ ### Features
25
+
26
+ - bump f36 packages to stable v4 [BAU-521] ([#988](https://github.com/contentful/field-editors/issues/988)) ([419cf56](https://github.com/contentful/field-editors/commit/419cf56692179b074fcfa2743469d5265ed98429))
27
+
6
28
  ## [1.0.8](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@1.0.7...@contentful/field-editor-rich-text@1.0.8) (2021-12-23)
7
29
 
8
30
  ### Bug Fixes
@@ -3023,12 +3023,20 @@ var HyperlinkPlugin = function HyperlinkPlugin(_ref) {
3023
3023
  return next();
3024
3024
  },
3025
3025
  normalizeNode: function normalizeNode(node, editor, next) {
3026
- if (isHyperlink(node.type) && node.getInlines().size > 0) {
3027
- return function () {
3028
- node.getInlines().forEach(function (inlineNode) {
3029
- return editor.unwrapInlineByKey(inlineNode.key, node.type);
3030
- });
3031
- };
3026
+ if (isHyperlink(node.type)) {
3027
+ if (node.text.trim() === '') {
3028
+ return function () {
3029
+ editor.removeNodeByKey(node.key);
3030
+ };
3031
+ }
3032
+
3033
+ if (node.getInlines().size > 0) {
3034
+ return function () {
3035
+ node.getInlines().forEach(function (inlineNode) {
3036
+ return editor.unwrapInlineByKey(inlineNode.key, node.type);
3037
+ });
3038
+ };
3039
+ }
3032
3040
  }
3033
3041
 
3034
3042
  next();