@flozy/editor 5.1.1 → 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.
|
@@ -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", {
|
|
@@ -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",
|
|
@@ -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) {
|