@flozy/editor 10.6.4 → 10.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.
- package/dist/Editor/CommonEditor.js +4 -0
- package/dist/Editor/Elements/FreeGrid/styles.js +2 -7
- package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +3 -0
- package/dist/Editor/common/RnD/VirtualElement/styles.js +6 -0
- package/dist/Editor/helper/index.js +6 -1
- package/package.json +1 -1
@@ -237,8 +237,12 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
237
237
|
const getPreviewImage = async (needBackground = false, options = {}) => {
|
238
238
|
ReactEditor.blur(editor);
|
239
239
|
const dom = needBackground ? editorWrapper?.current : editorWrapper?.current.getElementsByClassName("innert-editor-textbox")[0];
|
240
|
+
const pageBg = options?.fromBrains ? {
|
241
|
+
pageColor
|
242
|
+
} : {};
|
240
243
|
const c = await getThumbnailImage(dom, {
|
241
244
|
...options,
|
245
|
+
...pageBg,
|
242
246
|
proxy: `${otherProps?.PAGES_API_HOST}/page/2canvas`
|
243
247
|
});
|
244
248
|
return c;
|
@@ -356,14 +356,9 @@ const useFreeGridStyles = ({
|
|
356
356
|
},
|
357
357
|
"& .edt-paragraphs": {
|
358
358
|
margin: "0px"
|
359
|
-
}
|
360
|
-
},
|
361
|
-
"& .fgi_type_table": {
|
362
|
-
"& .edt-headings": {
|
363
|
-
margin: "0px"
|
364
359
|
},
|
365
|
-
"&
|
366
|
-
margin: "0px"
|
360
|
+
"& blockquote": {
|
361
|
+
margin: "0px !important"
|
367
362
|
}
|
368
363
|
},
|
369
364
|
/** element toolbar hide */
|
@@ -24,6 +24,9 @@ const useVirtualElementStyles = () => ({
|
|
24
24
|
},
|
25
25
|
"& .edt-paragraphs": {
|
26
26
|
margin: "0px"
|
27
|
+
},
|
28
|
+
"& blockquote": {
|
29
|
+
margin: "0px !important"
|
27
30
|
}
|
28
31
|
},
|
29
32
|
"& .freegrid-item": {
|
@@ -111,6 +114,9 @@ export const useAutoAlignStyles = () => ({
|
|
111
114
|
},
|
112
115
|
"& .edt-paragraphs": {
|
113
116
|
margin: "0px"
|
117
|
+
},
|
118
|
+
"& blockquote": {
|
119
|
+
margin: "0px !important"
|
114
120
|
}
|
115
121
|
},
|
116
122
|
// start - default signature classes on free-grid
|
@@ -14,7 +14,7 @@ export const getThumbnailImage = async (dom, options = {}) => {
|
|
14
14
|
windowWidth: 1440,
|
15
15
|
windowHeight: 768,
|
16
16
|
...options,
|
17
|
-
backgroundColor: '
|
17
|
+
backgroundColor: 'white',
|
18
18
|
allowTaint: true,
|
19
19
|
useCORS: false,
|
20
20
|
scale: 0.5,
|
@@ -23,6 +23,11 @@ export const getThumbnailImage = async (dom, options = {}) => {
|
|
23
23
|
// hide class
|
24
24
|
const sw = document.getElementById("slate-wrapper-scroll-container");
|
25
25
|
sw.style.minHeight = "2000px";
|
26
|
+
if (options?.fromBrains) {
|
27
|
+
const textbox = document.querySelector(".innert-editor-textbox");
|
28
|
+
textbox.style.padding = "24px";
|
29
|
+
textbox.style.background = options?.pageColor || '#fffff';
|
30
|
+
}
|
26
31
|
const svgFrames = document.querySelectorAll(".image-frame svg");
|
27
32
|
for (let i = 0; i < svgFrames.length; i++) {
|
28
33
|
svgFrames[i].style.width = "100%";
|