@flozy/editor 3.1.2 → 3.1.4
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.
|
@@ -91,15 +91,9 @@ const EditorButton = props => {
|
|
|
91
91
|
}
|
|
92
92
|
break;
|
|
93
93
|
case "actionTrigger":
|
|
94
|
-
if (readOnly) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
} = buttonLink || {};
|
|
98
|
-
const refUrl = url ? url.includes("http") ? url : `//${url}` : "Link";
|
|
99
|
-
props.component = "a";
|
|
100
|
-
if (refUrl !== "Link") {
|
|
101
|
-
props.href = refUrl;
|
|
102
|
-
}
|
|
94
|
+
if (!readOnly) {
|
|
95
|
+
props.component = "button";
|
|
96
|
+
props.onClick = () => {};
|
|
103
97
|
} else {
|
|
104
98
|
props.component = "button";
|
|
105
99
|
props.onClick = handleTrigger;
|
|
@@ -136,6 +130,8 @@ const EditorButton = props => {
|
|
|
136
130
|
}
|
|
137
131
|
};
|
|
138
132
|
break;
|
|
133
|
+
default:
|
|
134
|
+
return {};
|
|
139
135
|
}
|
|
140
136
|
return props;
|
|
141
137
|
};
|
|
@@ -6,7 +6,7 @@ import { IconButton, Tooltip, Grid as GridContainer } from "@mui/material";
|
|
|
6
6
|
import ArrowUpwardIcon from "@mui/icons-material/ArrowUpward";
|
|
7
7
|
import ArrowDownwardIcon from "@mui/icons-material/ArrowDownward";
|
|
8
8
|
import KeyboardReturnIcon from "@mui/icons-material/KeyboardReturn";
|
|
9
|
-
import ContentCopyIcon from
|
|
9
|
+
import ContentCopyIcon from "@mui/icons-material/ContentCopy";
|
|
10
10
|
import { insertGrid } from "../../utils/grid";
|
|
11
11
|
import { GridAddGridIcon, GridSettingsIcon } from "../../common/iconslist";
|
|
12
12
|
import GridPopup from "./GridPopup";
|
|
@@ -155,7 +155,8 @@ const Grid = props => {
|
|
|
155
155
|
const onNewLine = direction => () => {
|
|
156
156
|
try {
|
|
157
157
|
if (direction) {
|
|
158
|
-
|
|
158
|
+
const path = ReactEditor.findPath(editor, element);
|
|
159
|
+
let moveTo = direction === "up" ? path : Path.next(path);
|
|
159
160
|
let lastLine = false;
|
|
160
161
|
if (moveTo < 0) {
|
|
161
162
|
moveTo = 0;
|
|
@@ -169,7 +170,8 @@ const Grid = props => {
|
|
|
169
170
|
text: ""
|
|
170
171
|
}]
|
|
171
172
|
}, {
|
|
172
|
-
at: [moveTo]
|
|
173
|
+
at: [...moveTo],
|
|
174
|
+
select: true
|
|
173
175
|
});
|
|
174
176
|
if (lastLine) {
|
|
175
177
|
Transforms.move(editor, {
|