@contentful/field-editor-rich-text 1.0.7 → 1.1.2
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 +22 -0
- package/dist/field-editor-rich-text.cjs.development.js +14 -6
- package/dist/field-editor-rich-text.cjs.development.js.map +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js.map +1 -1
- package/dist/field-editor-rich-text.esm.js +14 -6
- package/dist/field-editor-rich-text.esm.js.map +1 -1
- package/package.json +8 -8
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.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)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
9
|
+
|
|
10
|
+
## [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)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- remove empty text hyperlinks ([#997](https://github.com/contentful/field-editors/issues/997)) ([d998132](https://github.com/contentful/field-editors/commit/d998132fbe948a98f6e800211a794bdd1e292233))
|
|
15
|
+
|
|
16
|
+
# [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)
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
- 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))
|
|
21
|
+
|
|
22
|
+
## [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)
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
- markdown buttons ([#968](https://github.com/contentful/field-editors/issues/968)) ([9803b98](https://github.com/contentful/field-editors/commit/9803b98c25d92df6148686ffe2749a77f7efdbb9))
|
|
27
|
+
|
|
6
28
|
## [1.0.7](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@1.0.6...@contentful/field-editor-rich-text@1.0.7) (2021-12-22)
|
|
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)
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
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();
|