@flozy/editor 10.5.0 → 10.5.2

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.
@@ -61,7 +61,7 @@ const Divider = props => {
61
61
  className: "element-toolbar dividerIcon",
62
62
  style: {
63
63
  top: "3px",
64
- left: 0
64
+ right: "8px"
65
65
  },
66
66
  children: /*#__PURE__*/_jsx(Tooltip, {
67
67
  title: translation("Divider Settings"),
@@ -140,9 +140,9 @@ const PopupTool = props => {
140
140
  sx: classes.popupWrapper,
141
141
  placement: "top-start",
142
142
  children: /*#__PURE__*/_jsx(Paper, {
143
- style: {
144
- borderRadius: "6px",
145
- border: "1px solid #8360FD"
143
+ sx: {
144
+ border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`,
145
+ boxShadow: '1px 2px 12px 0px #0000001F'
146
146
  },
147
147
  children: /*#__PURE__*/_jsx(MiniTextFormat, {
148
148
  editor: editor,
@@ -23,11 +23,12 @@ function getInlineTextStyles(element) {
23
23
  }
24
24
  const handleTableCell = (el, children) => {
25
25
  const wrapChild = children?.map(c => {
26
- if (typeof c === "string") {
26
+ const cellText = typeof c === "string" ? c : typeof c === "object" && typeof c?.text === "string" ? c?.text : null;
27
+ if (cellText !== null) {
27
28
  return {
28
29
  type: "paragraph",
29
30
  children: [{
30
- text: c
31
+ text: cellText
31
32
  }],
32
33
  cellBgColor: "#FFFFFF"
33
34
  };
@@ -137,8 +138,9 @@ const ELEMENT_TAGS = {
137
138
  type: "table-row"
138
139
  }),
139
140
  TD: handleTableCell,
140
- COLGROUP: paragraphType,
141
- COL: paragraphType,
141
+ // 'colgroup' and 'col' are commented out due to issues with table data copied from Microsoft Excel
142
+ // COLGROUP: paragraphType,
143
+ // COL: paragraphType,
142
144
  HR: () => ({
143
145
  type: "divider",
144
146
  borderColor: "#CCC"
@@ -18,7 +18,8 @@ const parseCopiedHTML = html => {
18
18
  });
19
19
 
20
20
  // to handle google docs list
21
- parsed.querySelectorAll("li p, li div").forEach(element => {
21
+ // 'col' tag added to resolve formatting issues with table data copied from Microsoft Excel
22
+ parsed.querySelectorAll("li p, li div, col").forEach(element => {
22
23
  const parent = element.parentNode;
23
24
  // Move all child nodes of <p> or <div> to its parent <li>
24
25
  while (element.firstChild) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "10.5.0",
3
+ "version": "10.5.2",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"