@flozy/editor 5.1.0 → 5.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/dist/Editor/Editor.css +1 -0
- package/dist/Editor/Elements/Button/EditorButton.js +3 -1
- package/dist/Editor/Elements/Carousel/Carousel.js +6 -1
- package/dist/Editor/Elements/SimpleText/style.js +5 -0
- package/dist/Editor/common/Section/index.js +2 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +1 -4
- package/dist/Editor/plugins/withCustomDeleteBackward.js +3 -2
- package/package.json +1 -1
package/dist/Editor/Editor.css
CHANGED
@@ -199,7 +199,9 @@ const EditorButton = props => {
|
|
199
199
|
lg: "inline-block"
|
200
200
|
}
|
201
201
|
}, theme);
|
202
|
-
const handleMoreBtn =
|
202
|
+
const handleMoreBtn = e => {
|
203
|
+
e.preventDefault();
|
204
|
+
e.stopPropagation();
|
203
205
|
setOpenMoreOptions(!openMoreOptions);
|
204
206
|
};
|
205
207
|
return /*#__PURE__*/_jsxs("div", {
|
@@ -92,7 +92,7 @@ const Carousel = props => {
|
|
92
92
|
className: "element-toolbar hr",
|
93
93
|
contentEditable: false,
|
94
94
|
style: {
|
95
|
-
top: "-
|
95
|
+
top: "-12px",
|
96
96
|
left: "0px"
|
97
97
|
},
|
98
98
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
@@ -136,6 +136,11 @@ const Carousel = props => {
|
|
136
136
|
style: {
|
137
137
|
padding: "12px"
|
138
138
|
},
|
139
|
+
sx: {
|
140
|
+
'& .simple-text': {
|
141
|
+
color: '#000'
|
142
|
+
}
|
143
|
+
},
|
139
144
|
contentEditable: false,
|
140
145
|
children: /*#__PURE__*/_jsx(Slider, {
|
141
146
|
...settings,
|
@@ -7,6 +7,11 @@ const SimpleTextStyle = ({
|
|
7
7
|
position: "relative",
|
8
8
|
padding: "0px",
|
9
9
|
lineHeight: lineHeight,
|
10
|
+
"&.signature": {
|
11
|
+
"& .placeholder-simple-text": {
|
12
|
+
opacity: 0
|
13
|
+
}
|
14
|
+
},
|
10
15
|
"& .placeholder-simple-text": {
|
11
16
|
color: "#94A3B8",
|
12
17
|
background: "transparent",
|
@@ -165,9 +165,9 @@ const Section = props => {
|
|
165
165
|
children: /*#__PURE__*/_jsxs(Box, {
|
166
166
|
sx: {
|
167
167
|
bgcolor: "background.paper",
|
168
|
-
background: "#F6F6F6",
|
169
168
|
height: "30px",
|
170
|
-
position: "relative"
|
169
|
+
position: "relative",
|
170
|
+
background: theme?.palette?.type === 'dark' ? theme?.palette?.editor?.miniToolBarBackground : '#F6F6F6'
|
171
171
|
},
|
172
172
|
children: [!readOnly && !showTool ? /*#__PURE__*/_jsx(DragHandle, {
|
173
173
|
...props,
|
@@ -25,9 +25,6 @@ const BannerSpacing = props => {
|
|
25
25
|
const [size] = useWindowResize();
|
26
26
|
const pro_value = getBreakPointsValue(val, size?.device);
|
27
27
|
const [value, setValue] = useState(pro_value);
|
28
|
-
useState(() => {
|
29
|
-
setValue(pro_value);
|
30
|
-
}, [pro_value]);
|
31
28
|
const handleChange = e => {
|
32
29
|
let changeAll = {};
|
33
30
|
if (lockSpacing) {
|
@@ -40,7 +37,7 @@ const BannerSpacing = props => {
|
|
40
37
|
...changeAll,
|
41
38
|
[e.target.name]: e.target.value
|
42
39
|
};
|
43
|
-
|
40
|
+
setValue(up_value);
|
44
41
|
onChange({
|
45
42
|
[key]: {
|
46
43
|
...getBreakPointsValue(val, null),
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { Editor, Node, Path, Point, Transforms } from "slate";
|
2
2
|
import { getNextNode } from "../utils/helper";
|
3
|
+
const BACKWARD_BLOCKS = ["list-item", "signature"];
|
3
4
|
const isNodeTextEmpty = node => {
|
4
5
|
const nodeText = Node.string(node);
|
5
6
|
return nodeText.trim() === "";
|
@@ -29,9 +30,9 @@ const withCustomDeleteBackward = editor => {
|
|
29
30
|
}
|
30
31
|
}
|
31
32
|
|
32
|
-
// Check if current node is a list item and is the last one
|
33
|
+
// Check if current node is a list item and is the last one, signature node
|
33
34
|
const [node] = Editor.nodes(editor, {
|
34
|
-
match: n => n.type
|
35
|
+
match: n => BACKWARD_BLOCKS.includes(n.type) // Adjust based on your list item type
|
35
36
|
});
|
36
37
|
|
37
38
|
if (node) {
|