@flozy/editor 4.1.5 → 4.1.6
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/dist/Editor/ChatEditor.js +12 -1
- package/dist/Editor/Elements/AI/AIInput.js +1 -1
- package/dist/Editor/Elements/AI/Styles.js +2 -1
- package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +3 -3
- package/dist/Editor/common/FontLoader/FontLoader.js +1 -0
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +15 -1
- package/package.json +1 -1
|
@@ -248,6 +248,16 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
248
248
|
restVal
|
|
249
249
|
});
|
|
250
250
|
};
|
|
251
|
+
const handlePaste = event => {
|
|
252
|
+
const items = event.clipboardData.items;
|
|
253
|
+
for (let i = 0; i < items.length; i++) {
|
|
254
|
+
if (items[i].type.startsWith("image/")) {
|
|
255
|
+
event.preventDefault(); // Prevent the default paste behavior
|
|
256
|
+
return; // Exit early to keep the editor empty
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
|
|
251
261
|
return /*#__PURE__*/_jsx(EditorProvider, {
|
|
252
262
|
theme: theme,
|
|
253
263
|
editor: editor,
|
|
@@ -267,7 +277,8 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
267
277
|
placeholder: "Start typing ...",
|
|
268
278
|
spellCheck: true,
|
|
269
279
|
onBlur: handleBlur,
|
|
270
|
-
onKeyDown: onKeyDown
|
|
280
|
+
onKeyDown: onKeyDown,
|
|
281
|
+
onPaste: handlePaste
|
|
271
282
|
}), !readOnly ? /*#__PURE__*/_jsx(MentionsPopup, {
|
|
272
283
|
ref: mentionsRef,
|
|
273
284
|
mentions: mentions,
|
|
@@ -81,7 +81,7 @@ function AIInput({
|
|
|
81
81
|
const selectWrapper = refs?.length ? refs[1]?.current : null;
|
|
82
82
|
const slateWrapper = document.getElementById("slate-wrapper-scroll-container");
|
|
83
83
|
if (selectWrapper && slateWrapper) {
|
|
84
|
-
const height = slateWrapper.offsetHeight - selectWrapper.offsetHeight -
|
|
84
|
+
const height = slateWrapper.offsetHeight - selectWrapper.offsetHeight - 170;
|
|
85
85
|
setContentHeight(height + "px");
|
|
86
86
|
}
|
|
87
87
|
}, [refs, generatedText]);
|
|
@@ -37,14 +37,14 @@ const FormTextArea = props => {
|
|
|
37
37
|
...getTRBLBreakPoints(bannerSpacing)
|
|
38
38
|
},
|
|
39
39
|
height: height || "150px",
|
|
40
|
-
borderColor: borderColor || "transparent"
|
|
40
|
+
borderColor: `${borderColor || "transparent"} !important`,
|
|
41
41
|
borderWidth: borderWidth || "1px",
|
|
42
42
|
borderRadius: {
|
|
43
43
|
...getBreakPointsValue(borderRadius || {}, null, "overrideBorderRadius", true)
|
|
44
44
|
},
|
|
45
45
|
borderStyle: borderStyle || "solid",
|
|
46
|
-
color: textColor || "#000"
|
|
47
|
-
background: bgColor || "transparent"
|
|
46
|
+
color: `${textColor || "#000"} !important`,
|
|
47
|
+
background: `${bgColor || "transparent"} !important`,
|
|
48
48
|
fontSize: '14px'
|
|
49
49
|
}
|
|
50
50
|
})
|
|
@@ -25,8 +25,22 @@ const Settings = props => {
|
|
|
25
25
|
children: /*#__PURE__*/_jsx(Popper, {
|
|
26
26
|
open: open,
|
|
27
27
|
anchorEl: anchorEl,
|
|
28
|
-
placement:
|
|
28
|
+
placement: "auto-start",
|
|
29
29
|
sx: classes.root,
|
|
30
|
+
modifiers: [{
|
|
31
|
+
name: "flip",
|
|
32
|
+
enabled: true,
|
|
33
|
+
options: {
|
|
34
|
+
altBoundary: true,
|
|
35
|
+
rootBoundary: "viewport"
|
|
36
|
+
}
|
|
37
|
+
}, {
|
|
38
|
+
name: "preventOverflow",
|
|
39
|
+
enabled: true,
|
|
40
|
+
options: {
|
|
41
|
+
padding: 8
|
|
42
|
+
}
|
|
43
|
+
}],
|
|
30
44
|
children: /*#__PURE__*/_jsxs(Paper, {
|
|
31
45
|
className: "papper-root",
|
|
32
46
|
children: [/*#__PURE__*/_jsxs(Typography, {
|