@flozy/editor 3.1.2 → 3.1.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -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, {
|