@flozy/editor 9.6.4 → 9.6.6

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.
@@ -516,9 +516,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
516
516
  window.open("https://www.flozy.com", "_blank");
517
517
  };
518
518
  const editorWrapperStyle = useMemo(() => {
519
- const style = {
520
- // color: pageTextColor || "",
521
- };
519
+ const style = {};
522
520
  if (pageBgImage && pageBgImage !== "none") {
523
521
  style.backgroundImage = `url(${pageBgImage})`;
524
522
  style.backgroundSize = `cover`;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React, { useMemo } from "react";
2
2
  import { Transforms, Node, Path } from "slate";
3
3
  import { useSlateStatic } from "slate-react";
4
4
  import { ReactEditor } from "slate-react";
@@ -41,7 +41,8 @@ const FreeGridBox = props => {
41
41
  height_xs,
42
42
  marginTop_xs,
43
43
  gridArea_xs,
44
- width_xs
44
+ width_xs,
45
+ left_xs
45
46
  } = element;
46
47
  // get values based on breakpoint size
47
48
  const {
@@ -156,9 +157,12 @@ const FreeGridBox = props => {
156
157
  };
157
158
  const repeatTimes = Math.floor(height / ROW_HEIGHT);
158
159
  const sectionTypeOptions = (itemOptions?.box || []).filter(f => (hideTools || []).indexOf(f) === -1);
160
+ const isBoxHeader = useMemo(() => {
161
+ return element?.children?.some(c => c.childType === "appHeader" && !c.xs_updatedOn);
162
+ }, [element]);
159
163
  return /*#__PURE__*/_jsx(RnD, {
160
164
  id: `freegrid_box_item_${path.join("|")}_${updated_at}_${breakpoint}`,
161
- className: `freegrid-item path-${path.length} breakpoint-${breakpoint}`,
165
+ className: `freegrid-item path-${path.length} breakpoint-${breakpoint} freegrid-box_${path.join("_")}`,
162
166
  editor: editor,
163
167
  path: path,
164
168
  actions: sectionTypeOptions,
@@ -187,7 +191,8 @@ const FreeGridBox = props => {
187
191
  "data-grid-area-xs": gridArea_xs,
188
192
  "data-margin-top-xs": marginTop_xs,
189
193
  "data-height-xs": height_xs,
190
- "data-width-xs": width_xs
194
+ "data-width-xs": width_xs,
195
+ "data-left-xs": left_xs
191
196
  },
192
197
  gridArea: gridArea,
193
198
  onChange: onChange,
@@ -207,6 +212,7 @@ const FreeGridBox = props => {
207
212
  customProps: customProps,
208
213
  translation: translation,
209
214
  breakpoint: breakpoint,
215
+ isBoxHeader: isBoxHeader,
210
216
  children: /*#__PURE__*/_jsx(Box, {
211
217
  component: "div",
212
218
  ...attributes,
@@ -39,7 +39,8 @@ const FreeGridItem = props => {
39
39
  height_xs,
40
40
  width_xs,
41
41
  marginTop_xs,
42
- gridArea_xs
42
+ gridArea_xs,
43
+ left_xs
43
44
  } = element;
44
45
  // get values based on breakpoint size
45
46
  const {
@@ -279,7 +280,8 @@ const FreeGridItem = props => {
279
280
  "data-grid-area-xs": gridArea_xs,
280
281
  "data-margin-top-xs": marginTop_xs,
281
282
  "data-height-xs": height_xs,
282
- "data-width-xs": width_xs
283
+ "data-width-xs": width_xs,
284
+ "data-left-xs": left_xs
283
285
  },
284
286
  defaultStyle: {
285
287
  height: `${height}px`,
@@ -28,7 +28,8 @@ const ShadowElement = props => {
28
28
  });
29
29
  return type === "child" && enable === 1 ? /*#__PURE__*/_jsx(Box, {
30
30
  component: "div",
31
- sx: classes.root
31
+ sx: classes.root,
32
+ className: "shadow-element"
32
33
  }) : null;
33
34
  };
34
35
  export default ShadowElement;
@@ -1,6 +1,6 @@
1
1
  import { Transforms, Node, Path, Editor } from "slate";
2
2
  import { ReactEditor } from "slate-react";
3
- import { handleNegativeInteger } from "../../../utils/helper";
3
+ import { getNode, handleNegativeInteger } from "../../../utils/helper";
4
4
  import { handleBoxAlignment } from "../VirtualElement/helper";
5
5
  export const ROW_HEIGHT = 50;
6
6
 
@@ -207,14 +207,12 @@ export function onDropItem(props, parentClass) {
207
207
  if (!isEmpty) {
208
208
  newPath = [...newPath, toSectionNode?.children?.length];
209
209
  }
210
- const moveSectionToSection = from?.length === 2 && moveTo?.length === 2;
211
-
212
- // const autoAlign = breakpoint === "lg" && moveSectionToSection;
213
210
  const autoAlign = breakpoint === "lg";
214
-
215
- // const boxNode = Node.get(editor, moveTo);
216
-
217
- if (moveTo?.length === 2 && autoAlign) {
211
+ const currentNode = getNode(editor, path);
212
+ const isBoxHeader = currentNode?.childType === "appHeader" && moveTo?.length > 2;
213
+ if (isBoxHeader) {
214
+ // will handle on <BoxHeaderAutoAlignment />
215
+ } else if (moveTo?.length === 2 && autoAlign) {
218
216
  // auto align in mobile
219
217
  Transforms.setNodes(editor, {
220
218
  xs_updatedOn: null
@@ -233,7 +231,7 @@ export function onDropItem(props, parentClass) {
233
231
  isEmpty
234
232
  }, autoAlign);
235
233
  reRenderChildNodes(editor, reRenderSectionPath || moveTo);
236
- if (autoAlign) {
234
+ if (autoAlign && !isBoxHeader) {
237
235
  handleBoxAlignment(editor, sectionNode, sectionPath);
238
236
  }
239
237
  return {
@@ -0,0 +1,43 @@
1
+ import { Box } from "@mui/material";
2
+ import { useAutoAlignStyles } from "./styles";
3
+ import { useEffect, useRef } from "react";
4
+ import updateAutoProps from "./updateAutoProps";
5
+ import { reRenderChildNodes } from "../Utils/gridDropItem";
6
+ import { calculateProps, sortElements } from "./helper";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ const appendItems = (boxCls, virtualRef, ROOT_ITEM_CLASS) => {
9
+ const cloneNode = document.querySelector(boxCls)?.cloneNode(true);
10
+ const items = cloneNode.querySelectorAll(ROOT_ITEM_CLASS);
11
+ if (!cloneNode || !items?.length) {
12
+ return;
13
+ }
14
+ virtualRef.current.innerHTML = "";
15
+ const container = virtualRef?.current;
16
+ sortElements(items, container);
17
+ };
18
+ function BoxHeaderAutoAlignment(props) {
19
+ const {
20
+ editor,
21
+ boxCls,
22
+ path
23
+ } = props;
24
+ const classes = useAutoAlignStyles();
25
+ const virtualRef = useRef();
26
+ useEffect(() => {
27
+ const childPathLength = path?.split("|").length + 1;
28
+ const ROOT_ITEM_CLASS = `.freegrid-item.path-${childPathLength}`;
29
+ appendItems(boxCls, virtualRef, ROOT_ITEM_CLASS);
30
+ const allData = calculateProps(path, virtualRef?.current, ROOT_ITEM_CLASS, [], null, true);
31
+ updateAutoProps(editor, allData, "xs", true);
32
+ const currentSectionPath = path.split("|").map(m => parseInt(m));
33
+ reRenderChildNodes(editor, currentSectionPath);
34
+ }, []);
35
+ return /*#__PURE__*/_jsx(Box, {
36
+ className: "header-box-mobile-virtual-mode",
37
+ ref: virtualRef,
38
+ sx: classes.root,
39
+ "aria-hidden": "true",
40
+ contentEditable: false
41
+ });
42
+ }
43
+ export default BoxHeaderAutoAlignment;
@@ -1,116 +1,43 @@
1
1
  import { Box } from "@mui/material";
2
2
  import { useAutoAlignStyles } from "./styles";
3
3
  import { useEffect, useRef } from "react";
4
- import { ROW_HEIGHT, calculateGridArea, reRenderChildNodes } from "../Utils/gridDropItem";
4
+ import { reRenderChildNodes } from "../Utils/gridDropItem";
5
5
  import updateAutoProps from "./updateAutoProps";
6
+ import { calculateProps, sortElements } from "./helper";
6
7
  import { jsx as _jsx } from "react/jsx-runtime";
7
8
  const ROOT_ITEM_CLASS = ".freegrid-item.path-3";
8
- const getMarginTop = y => {
9
- const calcMargin = y % ROW_HEIGHT;
10
- return calcMargin <= 0 ? 0 : calcMargin;
9
+ const appendItems = (sectionCls, virtualRef) => {
10
+ const cloneNode = document.querySelector(sectionCls)?.cloneNode(true);
11
+ const items = cloneNode?.querySelectorAll(ROOT_ITEM_CLASS) || [];
12
+ if (!cloneNode || !items?.length) {
13
+ return;
14
+ }
15
+ virtualRef.current.innerHTML = "";
16
+ const container = virtualRef?.current;
17
+ sortElements(items, container);
11
18
  };
12
19
  function ForceAutoAlignment(props) {
13
20
  const {
14
21
  editor,
15
22
  sectionCls,
16
23
  path,
17
- autoAlign,
18
24
  setAutoAlign
19
25
  } = props;
20
26
  const classes = useAutoAlignStyles();
21
27
  const virtualRef = useRef();
22
28
  useEffect(() => {
23
- let timeoutId;
24
- let autoAlignTimerId;
25
- if (virtualRef?.current && autoAlign) {
26
- timeoutId = setTimeout(() => {
27
- const allData = calculateProps(path, virtualRef?.current, ROOT_ITEM_CLASS, []);
28
- updateAutoProps(editor, allData, "xs", true);
29
- const currentSectionPath = path.split("|").map(m => parseInt(m));
30
- reRenderChildNodes(editor, currentSectionPath);
31
- autoAlignTimerId = setTimeout(() => {
32
- setAutoAlign(false);
33
- }, 500);
34
- }, 100);
35
- }
36
- return () => {
37
- if (timeoutId) {
38
- clearTimeout(timeoutId);
39
- }
40
- if (autoAlignTimerId) {
41
- clearTimeout(autoAlignTimerId);
42
- }
43
- };
44
- }, [virtualRef?.current]);
45
- const calculateProps = (curPath, dom, domClass, allData, parentDom) => {
46
- const rect = dom?.getBoundingClientRect();
47
- const bufferHeight = parentDom ? 0 : 12;
48
- const sectionProps = {
49
- path: curPath,
50
- props: {
51
- height: rect?.height + bufferHeight
52
- }
53
- };
54
- const itemsData = [];
55
- const items = dom.querySelectorAll(domClass);
56
- const nextItemPathLength = curPath?.split("|").length + 2;
57
- // let sectionHeight = 12;
58
- for (let i = 0; i < items.length; i++) {
59
- const itemRect = items[i]?.getBoundingClientRect();
60
- if (items[i]?.classList.contains("type_box")) {
61
- allData = calculateProps(items[i]?.dataset.path, items[i], `.freegrid-item.path-${nextItemPathLength}`, allData, dom);
62
- } else {
63
- const y = Math.abs(rect.top - itemRect?.top);
64
- itemsData.push({
65
- path: items[i]?.dataset.path,
66
- props: {
67
- top: y,
68
- left: 24,
69
- marginTop: getMarginTop(y),
70
- width: itemRect?.width,
71
- height: itemRect?.height,
72
- gridArea: calculateGridArea(y)
73
- }
74
- });
75
- // sectionHeight += itemRect?.height;
76
- }
77
- }
78
-
79
- if (dom?.classList.contains("type_box") && parentDom) {
80
- const parentDomRect = parentDom?.getBoundingClientRect();
81
- const y = Math.abs(parentDomRect.top - rect?.top);
82
- sectionProps.props.gridArea = calculateGridArea(y);
83
- sectionProps.props.left = 24;
84
- sectionProps.props.marginTop = getMarginTop(y);
85
- sectionProps.props.width = rect?.width;
86
- }
87
- allData = [sectionProps, [...allData, ...itemsData]]?.flat();
88
- return allData;
89
- };
90
- const getItems = () => {
91
- const cloneNode = document.querySelector(sectionCls)?.cloneNode(true);
92
- const items = cloneNode?.querySelectorAll(ROOT_ITEM_CLASS) || [];
93
- if (!cloneNode || !items?.length) {
94
- return;
95
- }
96
- let itemsHTML = "";
97
- for (let i = 0; i < items?.length; i++) {
98
- items[i].classList.add("exclude-virtual");
99
- itemsHTML += items[i].outerHTML;
100
- }
101
- return itemsHTML;
102
- };
29
+ appendItems(sectionCls, virtualRef);
30
+ const allData = calculateProps(path, virtualRef?.current, ROOT_ITEM_CLASS, []);
31
+ updateAutoProps(editor, allData, "xs", true);
32
+ const currentSectionPath = path.split("|").map(m => parseInt(m));
33
+ reRenderChildNodes(editor, currentSectionPath);
34
+ setAutoAlign(false);
35
+ }, []);
103
36
  return /*#__PURE__*/_jsx(Box, {
104
37
  className: "force-mobile-virtual-mode",
105
38
  ref: virtualRef,
106
- sx: {
107
- visibility: "hidden",
108
- ...classes.root
109
- },
39
+ sx: classes.root,
110
40
  "aria-hidden": "true",
111
- dangerouslySetInnerHTML: {
112
- __html: getItems()
113
- },
114
41
  contentEditable: false
115
42
  });
116
43
  }
@@ -1,4 +1,4 @@
1
- import { ROW_HEIGHT } from "../Utils/gridDropItem";
1
+ import { ROW_HEIGHT, calculateGridArea } from "../Utils/gridDropItem";
2
2
  import { Transforms, Editor } from "slate";
3
3
  const isBulletOrTickIcon = (width, itemStartRow, startRow) => {
4
4
  return width <= 40 && itemStartRow === startRow;
@@ -278,4 +278,98 @@ export const handleBoxAlignment = (editor, sectionNode, sectionPath) => {
278
278
  });
279
279
  });
280
280
  }
281
+ };
282
+ export const getMarginTop = y => {
283
+ const calcMargin = y % ROW_HEIGHT;
284
+ return calcMargin <= 0 ? 0 : calcMargin;
285
+ };
286
+ export const calculateProps = (curPath, dom, domClass, allData, parentDom, isBoxHeader) => {
287
+ const rect = dom?.getBoundingClientRect();
288
+ const bufferHeight = parentDom ? 0 : 12;
289
+ const sectionProps = {
290
+ path: curPath,
291
+ props: {
292
+ height: rect?.height + bufferHeight
293
+ }
294
+ };
295
+ const itemsData = [];
296
+ const items = dom.querySelectorAll(domClass);
297
+ const nextItemPathLength = curPath?.split("|").length + 2;
298
+ let sectionHeight = 12;
299
+ for (let i = 0; i < items.length; i++) {
300
+ const itemRect = items[i]?.getBoundingClientRect();
301
+ if (items[i]?.classList.contains("type_box")) {
302
+ allData = calculateProps(items[i]?.dataset.path, items[i], `.freegrid-item.path-${nextItemPathLength}`, allData, dom);
303
+ } else {
304
+ const y = Math.abs(rect.top - itemRect?.top);
305
+ const left = Math.abs(rect.left - itemRect?.left);
306
+ const isAppHeader = isBoxHeader || dom?.classList?.contains("appHeaderBox");
307
+ itemsData.push({
308
+ path: items[i]?.dataset.path,
309
+ props: {
310
+ top: y,
311
+ left: isAppHeader ? left : 24,
312
+ marginTop: getMarginTop(y),
313
+ width: itemRect?.width,
314
+ height: itemRect?.height,
315
+ gridArea: calculateGridArea(y)
316
+ }
317
+ });
318
+ sectionHeight += itemRect?.height;
319
+ }
320
+ }
321
+ if (dom?.classList.contains("type_box") && parentDom) {
322
+ const parentDomRect = parentDom?.getBoundingClientRect();
323
+ const isAppHeader = isBoxHeader || dom?.classList.contains("appHeaderBox");
324
+ const y = Math.abs(parentDomRect.top - rect?.top);
325
+ sectionProps.props.gridArea = calculateGridArea(y);
326
+ sectionProps.props.left = isAppHeader ? 6 : 24;
327
+ sectionProps.props.marginTop = getMarginTop(y);
328
+ sectionProps.props.width = rect?.width;
329
+ }
330
+ allData = [sectionProps, [...allData, ...itemsData]]?.flat();
331
+ return allData;
332
+ };
333
+ export const sortElements = (items, container) => {
334
+ const elementsArray = Array.from(items);
335
+ elementsArray.sort((a, b) => {
336
+ const aGridArea = a.dataset.gridAreaXs;
337
+ const bGridArea = b.dataset.gridAreaXs;
338
+
339
+ // If either element has no gridArea, push it to the end
340
+ if (!aGridArea) return 1;
341
+ if (!bGridArea) return -1;
342
+ const [aRow] = aGridArea.split("/").map(Number);
343
+ const [bRow] = bGridArea.split("/").map(Number);
344
+ if (aRow !== bRow) {
345
+ return aRow - bRow; // Sort by start row first
346
+ }
347
+
348
+ const aLeft = parseFloat(a.dataset.leftXs) || 0;
349
+ const bLeft = parseFloat(b.dataset.leftXs) || 0;
350
+ return aLeft - bLeft;
351
+ });
352
+
353
+ // Append sorted elements to container
354
+ elementsArray.forEach(item => {
355
+ container.appendChild(item);
356
+
357
+ // If item is a box, recursively sort its children
358
+ if (item.classList.contains("type_box")) {
359
+ const nestedContainer = item.querySelector(":scope > .fgi_type_box");
360
+ const isAppHeader = item.querySelector(".type_appHeader");
361
+ if (isAppHeader) {
362
+ item.classList.add("appHeaderBox");
363
+ }
364
+ if (nestedContainer) {
365
+ const childToRemove = nestedContainer.querySelector(":scope > .simple-text");
366
+ if (childToRemove) {
367
+ nestedContainer.removeChild(childToRemove);
368
+ }
369
+ const children = nestedContainer.children;
370
+ sortElements(children, nestedContainer);
371
+ item.appendChild(nestedContainer);
372
+ }
373
+ }
374
+ });
281
375
  };
@@ -56,6 +56,7 @@ export const useAutoAlignStyles = () => ({
56
56
  top: 0,
57
57
  height: "auto !important",
58
58
  pointerEvents: "none",
59
+ visibility: "hidden",
59
60
  "& .leaf-item": {
60
61
  fontSize: "var(--fontSize_xs) !important",
61
62
  "& span": {
@@ -139,6 +140,33 @@ export const useAutoAlignStyles = () => ({
139
140
  "& .embed": {
140
141
  minHeight: "300px"
141
142
  }
143
+ },
144
+ "& .appHeaderBox, &.header-box-mobile-virtual-mode": {
145
+ width: "calc(100% - 12px) !important",
146
+ "& .fgi_type_box": {
147
+ display: "flex",
148
+ justifyContent: "space-evenly !important",
149
+ flexWrap: "wrap"
150
+ },
151
+ "& .freegrid-item": {
152
+ left: "4px !important",
153
+ marginLeft: "0px !important"
154
+ },
155
+ "& .type_text": {
156
+ width: "fit-content !important"
157
+ },
158
+ "& .type_appHeader": {
159
+ width: "40px !important"
160
+ },
161
+ "& .shadow-element": {
162
+ display: "none"
163
+ }
164
+ },
165
+ "&.header-box-mobile-virtual-mode": {
166
+ width: "320px !important",
167
+ display: "flex",
168
+ justifyContent: "space-evenly !important",
169
+ flexWrap: "wrap"
142
170
  }
143
171
  }
144
172
  });
@@ -23,6 +23,7 @@ import { reRenderChildNodes } from "./Utils/gridDropItem";
23
23
  import VirtualTextElement from "./VirtualElement/VirtualTextElement";
24
24
  import useAutoScroll from "../../hooks/useAutoScroll";
25
25
  import ForceAutoAlignment from "./VirtualElement/ForceAutoAlignment";
26
+ import BoxHeaderAutoAlignment from "./VirtualElement/BoxHeaderAutoAlignment";
26
27
  import { jsx as _jsx } from "react/jsx-runtime";
27
28
  import { jsxs as _jsxs } from "react/jsx-runtime";
28
29
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -73,7 +74,8 @@ const RnD = props => {
73
74
  sectionElement,
74
75
  dataSets,
75
76
  autoAlign,
76
- setAutoAlign
77
+ setAutoAlign,
78
+ isBoxHeader
77
79
  } = props;
78
80
  const {
79
81
  isSelectedElement,
@@ -682,6 +684,10 @@ const RnD = props => {
682
684
  dataSets: dataSets,
683
685
  autoAlign: autoAlign,
684
686
  setAutoAlign: setAutoAlign
687
+ }) : null, isBoxHeader && breakpoint === "lg" ? /*#__PURE__*/_jsx(BoxHeaderAutoAlignment, {
688
+ boxCls: `.freegrid-box_${path.join("_")}`,
689
+ path: str_path,
690
+ editor: editor
685
691
  }) : null]
686
692
  });
687
693
  };
@@ -18,7 +18,19 @@ const withEmbeds = editor => {
18
18
  };
19
19
  editor.insertNodes = (...args) => {
20
20
  try {
21
+ const {
22
+ selection
23
+ } = editor;
24
+ if (!selection || !selection.focus) {
25
+ console.warn("No valid selection. Inserting nodes without selection.");
26
+ insertNodes(...args);
27
+ return;
28
+ }
21
29
  const parentPath = Path.parent(editor.selection.focus.path);
30
+ if (parentPath[parentPath.length - 1] === 0) {
31
+ insertNodes(...args);
32
+ return;
33
+ }
22
34
  const parentNode = Node.get(editor, parentPath);
23
35
  const previousPath = Path.previous(parentPath);
24
36
  const previousNode = Node.get(editor, previousPath);
@@ -1,4 +1,4 @@
1
- import { Editor, Transforms, Element as SlateElement, Range, Text, Element } from "slate";
1
+ import { Editor, Transforms, Element as SlateElement, Range } from "slate";
2
2
  import { Box } from "@mui/material";
3
3
  import { sizeMap } from "./font";
4
4
  import Link from "../Elements/Link/Link";
@@ -49,13 +49,23 @@ import ColumnView from "../Elements/DataView/Layouts/ColumnView";
49
49
  import SearchAttachment from "../Elements/Search/SearchAttachment";
50
50
  import { wrapThemeBreakpoints } from "../Elements/FreeGrid/breakpointConstants";
51
51
  import { jsx as _jsx } from "react/jsx-runtime";
52
+ import { jsxs as _jsxs } from "react/jsx-runtime";
52
53
  const alignment = ["alignLeft", "alignRight", "alignCenter", "alignJustify"];
53
54
  const list_types = ["orderedList", "unorderedList"];
54
55
  const LIST_FORMAT_TYPE = {
55
56
  orderedList: "list-item",
56
57
  unorderedList: "list-item"
57
58
  };
58
- const NEWLINESAFTER = ["headingOne", "headingTwo", "headingThree", "headingFour", "headingFive", "headingSix"];
59
+
60
+ // const NEWLINESAFTER = [
61
+ // "headingOne",
62
+ // "headingTwo",
63
+ // "headingThree",
64
+ // "headingFour",
65
+ // "headingFive",
66
+ // "headingSix",
67
+ // ];
68
+
59
69
  const THEME_BLOCK_FIELDS = ["headingOne", "headingTwo", "headingThree", "headingFour", "headingFive", "headingSix", "paragraphOne", "paragraphTwo", "paragraphThree"];
60
70
  export const toggleBlock = (editor, format, selection = true, attr = {}) => {
61
71
  const isActive = isBlockActive(editor, format);
@@ -402,40 +412,52 @@ export const getBlock = props => {
402
412
  });
403
413
  switch (element.type) {
404
414
  case "headingOne":
405
- return /*#__PURE__*/_jsx("h1", {
415
+ return /*#__PURE__*/_jsxs("h1", {
406
416
  ...commonHeadingProps(),
407
417
  placeholder: translation("Heading 1"),
408
- children: children
418
+ children: [children, /*#__PURE__*/_jsx("span", {
419
+ contentEditable: false
420
+ })]
409
421
  });
410
422
  case "headingTwo":
411
- return /*#__PURE__*/_jsx("h2", {
423
+ return /*#__PURE__*/_jsxs("h2", {
412
424
  ...commonHeadingProps(),
413
425
  placeholder: translation("Heading 2"),
414
- children: children
426
+ children: [children, /*#__PURE__*/_jsx("span", {
427
+ contentEditable: false
428
+ })]
415
429
  });
416
430
  case "headingThree":
417
- return /*#__PURE__*/_jsx("h3", {
431
+ return /*#__PURE__*/_jsxs("h3", {
418
432
  ...commonHeadingProps(),
419
433
  placeholder: translation("Heading 3"),
420
- children: children
434
+ children: [children, /*#__PURE__*/_jsx("span", {
435
+ contentEditable: false
436
+ })]
421
437
  });
422
438
  case "headingFour":
423
- return /*#__PURE__*/_jsx("h4", {
439
+ return /*#__PURE__*/_jsxs("h4", {
424
440
  ...commonHeadingProps(),
425
441
  placeholder: translation("Heading 4"),
426
- children: children
442
+ children: [children, /*#__PURE__*/_jsx("span", {
443
+ contentEditable: false
444
+ })]
427
445
  });
428
446
  case "headingFive":
429
- return /*#__PURE__*/_jsx("h5", {
447
+ return /*#__PURE__*/_jsxs("h5", {
430
448
  ...commonHeadingProps(),
431
449
  placeholder: translation("Heading 5"),
432
- children: children
450
+ children: [children, /*#__PURE__*/_jsx("span", {
451
+ contentEditable: false
452
+ })]
433
453
  });
434
454
  case "headingSix":
435
- return /*#__PURE__*/_jsx("h6", {
455
+ return /*#__PURE__*/_jsxs("h6", {
436
456
  ...commonHeadingProps(),
437
457
  placeholder: translation("Heading 6"),
438
- children: children
458
+ children: [children, /*#__PURE__*/_jsx("span", {
459
+ contentEditable: false
460
+ })]
439
461
  });
440
462
  case "paragraphOne":
441
463
  return /*#__PURE__*/_jsx("p", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "9.6.4",
3
+ "version": "9.6.6",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"