@flozy/editor 1.6.2 → 1.6.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.
- package/dist/Editor/CommonEditor.js +5 -3
- package/dist/Editor/Toolbar/PopupTool/AddElements.js +3 -0
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +4 -0
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +1 -0
- package/dist/Editor/common/Icon.js +4 -2
- package/dist/Editor/common/MentionsPopup/ElementsListCard.js +2 -1
- package/dist/Editor/common/MentionsPopup/MentionsListCard.js +2 -1
- package/dist/Editor/plugins/withLayout.js +4 -2
- package/package.json +1 -1
|
@@ -90,7 +90,9 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
90
90
|
footer,
|
|
91
91
|
needLayout = true,
|
|
92
92
|
CHARACTERS = [],
|
|
93
|
-
editorClass
|
|
93
|
+
editorClass,
|
|
94
|
+
fixedWidth = "60%",
|
|
95
|
+
fullWidth = "80%"
|
|
94
96
|
} = otherProps || {};
|
|
95
97
|
const [drag, setDrag] = useState(null);
|
|
96
98
|
const classes = editorStyles({
|
|
@@ -451,14 +453,14 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
451
453
|
className: "scroll-area",
|
|
452
454
|
children: /*#__PURE__*/_jsxs("div", {
|
|
453
455
|
ref: editorWrapper,
|
|
454
|
-
className: `editor-wrapper`,
|
|
456
|
+
className: `editor-wrapper ${pageWidth === "fixed" ? "fixed" : "full"}`,
|
|
455
457
|
style: {
|
|
456
458
|
backgroundColor: pageColor || "#FFF",
|
|
457
459
|
paddingLeft: `${bannerSpacing?.left || 12}px`,
|
|
458
460
|
paddingRight: `${bannerSpacing?.right || 12}px`,
|
|
459
461
|
paddingTop: `${bannerSpacing?.top}px`,
|
|
460
462
|
paddingBottom: `${bannerSpacing?.bottom}px`,
|
|
461
|
-
width: !pageWidth || pageWidth === "fixed" ?
|
|
463
|
+
width: !pageWidth || pageWidth === "fixed" ? fixedWidth : fullWidth,
|
|
462
464
|
// width: viewport.w ? `${viewport.w}px` : "100%",
|
|
463
465
|
height: viewport.h ? `${viewport.h}px` : `100%`,
|
|
464
466
|
alignSelf: "center",
|
|
@@ -135,7 +135,8 @@ const iconList = {
|
|
|
135
135
|
size: 20
|
|
136
136
|
}),
|
|
137
137
|
emoji: /*#__PURE__*/_jsx(MdEmojiEmotions, {
|
|
138
|
-
size: 20
|
|
138
|
+
size: 20,
|
|
139
|
+
fill: "#64748B"
|
|
139
140
|
}),
|
|
140
141
|
grid: /*#__PURE__*/_jsx(GridIcon, {}),
|
|
141
142
|
accordion: /*#__PURE__*/_jsx(AccordionIcon, {}),
|
|
@@ -166,7 +167,8 @@ const iconList = {
|
|
|
166
167
|
}),
|
|
167
168
|
embed: /*#__PURE__*/_jsx(LinkIcon, {}),
|
|
168
169
|
topbanner: /*#__PURE__*/_jsx(IoIosImage, {
|
|
169
|
-
size: 20
|
|
170
|
+
size: 20,
|
|
171
|
+
fill: "#64748B"
|
|
170
172
|
}),
|
|
171
173
|
fileUpload: /*#__PURE__*/_jsx(MdOutlineFileUpload, {
|
|
172
174
|
size: 20
|
|
@@ -28,6 +28,7 @@ const withLayout = editor => {
|
|
|
28
28
|
at: path.concat(1)
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
+
let prevType = "";
|
|
31
32
|
for (const [child, childPath] of Node.children(editor, path)) {
|
|
32
33
|
let type = "";
|
|
33
34
|
const slateIndex = childPath[0];
|
|
@@ -43,11 +44,12 @@ const withLayout = editor => {
|
|
|
43
44
|
};
|
|
44
45
|
switch (slateIndex) {
|
|
45
46
|
case 0:
|
|
46
|
-
type = "title";
|
|
47
|
+
type = child.type === "topbanner" ? "topbanner" : "title";
|
|
48
|
+
prevType = type;
|
|
47
49
|
enforceType(type);
|
|
48
50
|
break;
|
|
49
51
|
case 1:
|
|
50
|
-
type = "paragraph";
|
|
52
|
+
type = prevType === "topbanner" ? "title" : "paragraph";
|
|
51
53
|
enforceType(type);
|
|
52
54
|
break;
|
|
53
55
|
default:
|