@teamias/rex-design 0.0.15 → 0.0.16
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.
|
@@ -32,6 +32,7 @@ import { Box } from "./styles";
|
|
|
32
32
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
33
33
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
34
34
|
export var TiptapEditor = function TiptapEditor(_ref) {
|
|
35
|
+
var _ref2;
|
|
35
36
|
var _ref$type = _ref.type,
|
|
36
37
|
type = _ref$type === void 0 ? 'html' : _ref$type,
|
|
37
38
|
_ref$maxHeight = _ref.maxHeight,
|
|
@@ -121,9 +122,9 @@ export var TiptapEditor = function TiptapEditor(_ref) {
|
|
|
121
122
|
// onError: (error) => console.error('Upload failed:', error),
|
|
122
123
|
// }),
|
|
123
124
|
]),
|
|
124
|
-
content: defaultValue
|
|
125
|
-
onUpdate: function onUpdate(
|
|
126
|
-
var editor =
|
|
125
|
+
content: (_ref2 = value !== null && value !== void 0 ? value : defaultValue) !== null && _ref2 !== void 0 ? _ref2 : '',
|
|
126
|
+
onUpdate: function onUpdate(_ref3) {
|
|
127
|
+
var editor = _ref3.editor;
|
|
127
128
|
if (type === 'text') {
|
|
128
129
|
// `<p style="margin: 0">/qwe/<react-variable-node selected="qwe"></react-variable-node></p>`.replace(/<p.*?>(.*?)<\/p>/, '$1');
|
|
129
130
|
var text = editor.getHTML();
|