@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
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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,
|