@flozy/editor 9.0.5 → 9.0.9
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.
@@ -14,7 +14,7 @@ import SelectSuperSubscript from "./MiniTextFormat/SelectSuperSubscript";
|
|
14
14
|
import { ColorResetIcon, TextDefaultStyleIcon } from "../../common/iconListV2";
|
15
15
|
import FontFamilyAutocomplete from "../FormatTools/FontFamilyAutocomplete";
|
16
16
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
17
|
-
import LineSpacing from "../../common/StyleBuilder/fieldTypes/lineSpacing";
|
17
|
+
// import LineSpacing from "../../common/StyleBuilder/fieldTypes/lineSpacing";
|
18
18
|
import { getPageSettings } from "../../utils/pageSettings";
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
20
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -36,7 +36,7 @@ const TextFormat = props => {
|
|
36
36
|
const {
|
37
37
|
element: pageSt
|
38
38
|
} = getPageSettings(editor) || {};
|
39
|
-
const pageSettingLine = pageSt?.pageProps?.lineHeight;
|
39
|
+
// const pageSettingLine = pageSt?.pageProps?.lineHeight;
|
40
40
|
const {
|
41
41
|
fontFamilies,
|
42
42
|
theme
|
@@ -44,7 +44,7 @@ const TextFormat = props => {
|
|
44
44
|
const {
|
45
45
|
activeBreakPoint
|
46
46
|
} = useEditorContext();
|
47
|
-
const breakpoint = activeBreakPoint === "" ? "lg" : activeBreakPoint;
|
47
|
+
// const breakpoint = activeBreakPoint === "" ? "lg" : activeBreakPoint;
|
48
48
|
const fontWeight = allTools.find(f => f.format === "fontWeight");
|
49
49
|
const fontStyle = allTools.filter(f => f.type === "mark" && f.format !== "strikethrough" && f.format !== "superscript" && f.format !== "subscript");
|
50
50
|
const fontAlign = allTools.filter(f => f.format?.indexOf("align") >= 0);
|
@@ -61,8 +61,12 @@ const TextFormat = props => {
|
|
61
61
|
color: "",
|
62
62
|
bgColor: ""
|
63
63
|
};
|
64
|
-
|
65
|
-
|
64
|
+
|
65
|
+
// let lineSpacingValue = activeMark(editor, "lineHeight");
|
66
|
+
// lineSpacingValue =
|
67
|
+
// lineSpacingValue?.[breakpoint] !== undefined
|
68
|
+
// ? lineSpacingValue
|
69
|
+
// : pageSettingLine;
|
66
70
|
const handleColorPicker = type => e => {
|
67
71
|
setType(type);
|
68
72
|
setAnchorEl(e.currentTarget);
|
@@ -103,13 +107,11 @@ const TextFormat = props => {
|
|
103
107
|
value
|
104
108
|
});
|
105
109
|
};
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
});
|
112
|
-
};
|
110
|
+
|
111
|
+
// const handleLineSpacing = (data) => {
|
112
|
+
// const [[format, value]] = Object.entries(data);
|
113
|
+
// addMarkData(editor, { format, value });
|
114
|
+
// };
|
113
115
|
return /*#__PURE__*/_jsxs(Grid, {
|
114
116
|
container: true,
|
115
117
|
sx: classes.textFormatWrapper,
|
@@ -379,32 +381,6 @@ const TextFormat = props => {
|
|
379
381
|
xs: 12,
|
380
382
|
sx: classes.dividerGrid,
|
381
383
|
children: /*#__PURE__*/_jsx(Divider, {})
|
382
|
-
}), /*#__PURE__*/_jsxs(Grid, {
|
383
|
-
item: true,
|
384
|
-
xs: 12,
|
385
|
-
children: [/*#__PURE__*/_jsx(Typography, {
|
386
|
-
variant: "body1",
|
387
|
-
color: "primary",
|
388
|
-
sx: classes.typoLabel,
|
389
|
-
children: "Line Spacing"
|
390
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
391
|
-
item: true,
|
392
|
-
xs: 12,
|
393
|
-
className: "typo-icons",
|
394
|
-
sx: classes.evenSpace,
|
395
|
-
children: /*#__PURE__*/_jsx(LineSpacing, {
|
396
|
-
value: lineSpacingValue,
|
397
|
-
onChange: handleLineSpacing,
|
398
|
-
data: {
|
399
|
-
key: 'lineHeight'
|
400
|
-
}
|
401
|
-
})
|
402
|
-
})]
|
403
|
-
}), /*#__PURE__*/_jsx(Grid, {
|
404
|
-
item: true,
|
405
|
-
xs: 12,
|
406
|
-
sx: classes.dividerGrid,
|
407
|
-
children: /*#__PURE__*/_jsx(Divider, {})
|
408
384
|
}), /*#__PURE__*/_jsx(Grid, {
|
409
385
|
item: true,
|
410
386
|
xs: 12,
|
@@ -25,11 +25,13 @@ const pageSettingsStyle = [{
|
|
25
25
|
label: "Padding",
|
26
26
|
key: "bannerSpacing",
|
27
27
|
type: "bannerSpacing"
|
28
|
-
}
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
}
|
29
|
+
// {
|
30
|
+
// label: "Line Spacing",
|
31
|
+
// key: "lineHeight",
|
32
|
+
// type: "lineSpacing",
|
33
|
+
// },
|
34
|
+
]
|
33
35
|
}, {
|
34
36
|
tab: "Max Width",
|
35
37
|
value: "maxWidth",
|