@flozy/editor 6.0.0 → 6.0.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.
- package/dist/Editor/Editor.css +3 -2
- package/dist/Editor/Elements/Table/Table.js +12 -12
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +2 -7
- package/dist/Editor/common/ImageSelector/UploadStyles.js +2 -1
- package/dist/Editor/common/RnD/ElementSettings/styles.js +1 -0
- package/dist/Editor/plugins/withHTML.js +7 -1
- package/dist/Editor/utils/SlateUtilityFunctions.js +1 -1
- package/package.json +2 -2
package/dist/Editor/Editor.css
CHANGED
@@ -1279,9 +1279,10 @@ blockquote {
|
|
1279
1279
|
background: none !important;
|
1280
1280
|
}
|
1281
1281
|
@media (max-width: 899px) {
|
1282
|
-
|
1282
|
+
/* Qa validation required */
|
1283
|
+
/* .MuiPopover-root {
|
1283
1284
|
z-index: 1302 !important;
|
1284
|
-
}
|
1285
|
+
} */
|
1285
1286
|
|
1286
1287
|
canvas {
|
1287
1288
|
max-width: 100% !important;
|
@@ -30,16 +30,14 @@ const ToolTableComponent = props => {
|
|
30
30
|
const {
|
31
31
|
updateTableSelection
|
32
32
|
} = useTable();
|
33
|
-
return /*#__PURE__*/_jsx(
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
updateTableSelection(getDefaultTableSelection());
|
40
|
-
}
|
33
|
+
return /*#__PURE__*/_jsx(TableTool, {
|
34
|
+
theme: editorTheme,
|
35
|
+
handleToolAction: (type, option) => {
|
36
|
+
handleAction(type, option);
|
37
|
+
if (type === "duplicate") {
|
38
|
+
updateTableSelection(getDefaultTableSelection());
|
41
39
|
}
|
42
|
-
}
|
40
|
+
}
|
43
41
|
});
|
44
42
|
};
|
45
43
|
const MoreTableSettings = props => {
|
@@ -74,9 +72,11 @@ const MoreTableSettings = props => {
|
|
74
72
|
placement: "bottom-start",
|
75
73
|
children: /*#__PURE__*/_jsx(ClickAwayListener, {
|
76
74
|
onClickAway: () => setExpandTools(false),
|
77
|
-
children: /*#__PURE__*/_jsx(
|
78
|
-
|
79
|
-
|
75
|
+
children: /*#__PURE__*/_jsx("div", {
|
76
|
+
children: /*#__PURE__*/_jsx(ToolTableComponent, {
|
77
|
+
handleAction: handleAction,
|
78
|
+
editorTheme: editorTheme
|
79
|
+
})
|
80
80
|
})
|
81
81
|
})
|
82
82
|
});
|
@@ -151,15 +151,10 @@ function SelectTypography({
|
|
151
151
|
toggleBlock(editor, format);
|
152
152
|
if (option.type === "block") {
|
153
153
|
// reset old font size
|
154
|
-
let updatedValue = !selectedBlock ? {} : {
|
155
|
-
xs: "16px",
|
156
|
-
sm: "16px",
|
157
|
-
md: "16px",
|
158
|
-
lg: "16px"
|
159
|
-
};
|
154
|
+
// let updatedValue = !selectedBlock ? {} : { xs: "16px", sm: "16px", md: "16px", lg: "16px" }
|
160
155
|
addMarkData(editor, {
|
161
156
|
format: "fontSize",
|
162
|
-
value:
|
157
|
+
value: {}
|
163
158
|
});
|
164
159
|
} else if (option.type === "mark") {
|
165
160
|
const size = sizeMap[option.value] || "";
|
@@ -58,6 +58,7 @@ const useElementSettingsStyle = theme => ({
|
|
58
58
|
maxHeight: "500px",
|
59
59
|
overflowX: "hidden",
|
60
60
|
overflowY: "auto",
|
61
|
+
paddingLeft: "4px",
|
61
62
|
background: theme?.palette?.editor?.background,
|
62
63
|
"& .MuiTypography-root, .MuiInputBase-root, input": {
|
63
64
|
color: theme?.palette?.editor?.textColor
|
@@ -253,7 +253,13 @@ const withHtml = editor => {
|
|
253
253
|
return;
|
254
254
|
}
|
255
255
|
const fragment = deserialize(parsed.body);
|
256
|
-
const
|
256
|
+
const normalizeFragment = formatFragment[eltype];
|
257
|
+
if (normalizeFragment && isNonText) {
|
258
|
+
// When a non-text node is pasted into a list item, insert it into the next node.
|
259
|
+
insertAtNextNode(editor, fragment);
|
260
|
+
return;
|
261
|
+
}
|
262
|
+
const formattedFragment = normalizeFragment ? normalizeFragment(fragment) : fragment;
|
257
263
|
let is_img_table = false;
|
258
264
|
formattedFragment.map(f => {
|
259
265
|
if (f.type === "image" || f?.type?.includes("table")) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@flozy/editor",
|
3
|
-
"version": "6.0.
|
3
|
+
"version": "6.0.2",
|
4
4
|
"description": "An Editor for flozy app brain",
|
5
5
|
"files": [
|
6
6
|
"dist"
|
@@ -61,7 +61,7 @@
|
|
61
61
|
"scripts": {
|
62
62
|
"prepare": "husky install .husky",
|
63
63
|
"analyze": "source-map-explorer build/static/js/*.js",
|
64
|
-
"lint": "./node_modules/.bin/eslint --ignore-path .gitignore .",
|
64
|
+
"lint": "./node_modules/. bin/eslint --ignore-path .gitignore .",
|
65
65
|
"start": "craco start",
|
66
66
|
"build": "NODE_OPTIONS='--max_old_space_size=4096' craco build",
|
67
67
|
"test": "craco test --passWithNoTests",
|