@flozy/editor 9.7.1 → 9.7.3

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.
@@ -134,8 +134,7 @@ const SearchAndDocList = ({
134
134
  position: 'relative',
135
135
  maxHeight: '400px',
136
136
  minWidth: "275px",
137
- overflowY: 'auto',
138
- overflowX: 'hidden',
137
+ overflow: 'auto',
139
138
  padding: '0px 16px 8px',
140
139
  marginBottom: '20px',
141
140
  scrollbarWidth: "thin",
@@ -3,6 +3,7 @@ import { Editor, Text } from "slate";
3
3
  import { useSlate } from "slate-react";
4
4
  import { getNodeText } from "../../utils/helper";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
+ import { jsxs as _jsxs } from "react/jsx-runtime";
6
7
  const Title = props => {
7
8
  const {
8
9
  attributes,
@@ -12,7 +13,7 @@ const Title = props => {
12
13
  } = props;
13
14
  const isEmpty = !customProps?.readOnly && isEmptyTextNode(element?.children[0]) ? "empty" : "";
14
15
  useDetectExitFromTitle(element, customProps?.getTitleSaveData);
15
- return /*#__PURE__*/_jsx("div", {
16
+ return /*#__PURE__*/_jsxs("div", {
16
17
  ...attributes,
17
18
  placeholder: "Title",
18
19
  className: `content-editable ${isEmpty}`,
@@ -20,7 +21,9 @@ const Title = props => {
20
21
  fontWeight: "bold",
21
22
  fontSize: "20px"
22
23
  },
23
- children: children
24
+ children: [children, /*#__PURE__*/_jsx("span", {
25
+ contentEditable: false
26
+ })]
24
27
  });
25
28
  };
26
29
  export default Title;
@@ -49,6 +49,7 @@ 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 = {
@@ -289,52 +290,64 @@ export const getBlock = props => {
289
290
  const isEmpty = isEmptyTextNode(element);
290
291
  switch (element.type) {
291
292
  case "headingOne":
292
- return /*#__PURE__*/_jsx("h1", {
293
+ return /*#__PURE__*/_jsxs("h1", {
293
294
  ...attributes,
294
295
  ...element.attr,
295
296
  className: `edt-headings content-editable ${isEmpty ? "empty" : ""}`,
296
297
  placeholder: "Heading 1",
297
- children: children
298
+ children: [children, /*#__PURE__*/_jsx("span", {
299
+ contentEditable: false
300
+ })]
298
301
  });
299
302
  case "headingTwo":
300
- return /*#__PURE__*/_jsx("h2", {
303
+ return /*#__PURE__*/_jsxs("h2", {
301
304
  ...attributes,
302
305
  ...element.attr,
303
306
  className: `edt-headings content-editable ${isEmpty ? "empty" : ""}`,
304
307
  placeholder: "Heading 2",
305
- children: children
308
+ children: [children, /*#__PURE__*/_jsx("span", {
309
+ contentEditable: false
310
+ })]
306
311
  });
307
312
  case "headingThree":
308
- return /*#__PURE__*/_jsx("h3", {
313
+ return /*#__PURE__*/_jsxs("h3", {
309
314
  ...attributes,
310
315
  ...element.attr,
311
316
  className: `edt-headings content-editable ${isEmpty ? "empty" : ""}`,
312
317
  placeholder: "Heading 3",
313
- children: children
318
+ children: [children, /*#__PURE__*/_jsx("span", {
319
+ contentEditable: false
320
+ })]
314
321
  });
315
322
  case "headingFour":
316
- return /*#__PURE__*/_jsx("h4", {
323
+ return /*#__PURE__*/_jsxs("h4", {
317
324
  ...attributes,
318
325
  ...element.attr,
319
326
  className: `edt-headings content-editable ${isEmpty ? "empty" : ""}`,
320
327
  placeholder: "Heading 4",
321
- children: children
328
+ children: [children, /*#__PURE__*/_jsx("span", {
329
+ contentEditable: false
330
+ })]
322
331
  });
323
332
  case "headingFive":
324
- return /*#__PURE__*/_jsx("h5", {
333
+ return /*#__PURE__*/_jsxs("h5", {
325
334
  ...attributes,
326
335
  ...element.attr,
327
336
  className: `edt-headings content-editable ${isEmpty ? "empty" : ""}`,
328
337
  placeholder: "Heading 5",
329
- children: children
338
+ children: [children, /*#__PURE__*/_jsx("span", {
339
+ contentEditable: false
340
+ })]
330
341
  });
331
342
  case "headingSix":
332
- return /*#__PURE__*/_jsx("h6", {
343
+ return /*#__PURE__*/_jsxs("h6", {
333
344
  ...attributes,
334
345
  ...element.attr,
335
346
  className: `edt-headings content-editable ${isEmpty ? "empty" : ""}`,
336
347
  placeholder: "Heading 6",
337
- children: children
348
+ children: [children, /*#__PURE__*/_jsx("span", {
349
+ contentEditable: false
350
+ })]
338
351
  });
339
352
  case "blockquote":
340
353
  return /*#__PURE__*/_jsx("blockquote", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "9.7.1",
3
+ "version": "9.7.3",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"