@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.
@@ -140,9 +140,9 @@ const PopupTool = props => {
|
|
140
140
|
sx: classes.popupWrapper,
|
141
141
|
placement: "top-start",
|
142
142
|
children: /*#__PURE__*/_jsx(Paper, {
|
143
|
-
|
144
|
-
|
145
|
-
|
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
|
-
|
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:
|
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
|
-
|
141
|
-
|
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
|
-
|
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) {
|