@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 '@mui/icons-material/ContentCopy';
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
- let moveTo = direction === "up" ? path[0] - 1 : path[0] + 1;
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, {
@@ -107,6 +107,7 @@ function SelectFontSize({
107
107
  className: `customSelectOptionLabel ${fontSize === s ? "selected" : ""}`,
108
108
  onClick: () => {
109
109
  setFontSize(s);
110
+ onChangeSize(s);
110
111
  },
111
112
  children: s
112
113
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "3.1.2",
3
+ "version": "3.1.3",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"