@examplary/ui 1.53.1 → 1.54.0

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.
@@ -104,16 +104,20 @@ export var MinimalRichTextField = function (_a) {
104
104
  var editor = useEditor({
105
105
  onUpdate: function (_a) {
106
106
  var editor = _a.editor;
107
- var html = editor.getHTML();
108
- html = isEmpty(html) ? "" : html;
109
- setContent(html);
110
- onChange === null || onChange === void 0 ? void 0 : onChange(html);
107
+ if (onChange || !fragment) {
108
+ var html = editor.getHTML();
109
+ html = isEmpty(html) ? "" : html;
110
+ setContent(html);
111
+ onChange === null || onChange === void 0 ? void 0 : onChange(html);
112
+ }
111
113
  },
112
114
  onBlur: function (_a) {
113
115
  var editor = _a.editor;
114
- var html = editor.getHTML();
115
- html = isEmpty(html) ? "" : html;
116
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(html);
116
+ if (onBlur) {
117
+ var html = editor.getHTML();
118
+ html = isEmpty(html) ? "" : html;
119
+ onBlur(html);
120
+ }
117
121
  },
118
122
  autofocus: autoFocus,
119
123
  content: fragment ? undefined : content,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@examplary/ui",
3
3
  "description": "UI components for the Examplary testing platform.",
4
4
  "packageManager": "yarn@4.5.3",
5
- "version": "1.53.1",
5
+ "version": "1.54.0",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "files": [