@flozy/editor 11.1.4 → 11.1.7

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.
@@ -9,7 +9,7 @@ import { useEditorContext } from "../../hooks/useMouseMove";
9
9
  import usePopupStyles from "../PopupTool/PopupToolStyle";
10
10
  import useEditorScroll from "../../hooks/useEditorScroll";
11
11
  import { isCarouselSelected } from "../../helper";
12
- import { hideSlateSelection, viewSlateSelection } from "../../utils/helper";
12
+ import { viewSlateSelection } from "../../utils/helper";
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
  const isSlateDOM = event => {
15
15
  return event.target.getAttribute("data-slate-string") === "true";
@@ -95,7 +95,6 @@ const PopupTool = props => {
95
95
  const isFreeGridEnabled = enable === 1 && isFreeGridElement;
96
96
  if (!selection || Range.isCollapsed(selection) || Editor.string(editor, selection) === "" || isFreeGridEnabled) {
97
97
  setAnchorEl(null);
98
- hideSlateSelection(); // removes slate selection background, when there is no selection
99
98
  } else {
100
99
  updateAnchorEl();
101
100
  viewSlateSelection();
@@ -1059,12 +1059,16 @@ export const getSelectedElementColor = (editor, format, theme) => {
1059
1059
  };
1060
1060
  export const GetsectionBgImage = sectionBackgroundImage => {
1061
1061
  if (sectionBackgroundImage && sectionBackgroundImage !== "none") {
1062
- return {
1063
- backgroundImage: `url(${sectionBackgroundImage})`
1064
- };
1062
+ if (typeof sectionBackgroundImage === "object") {
1063
+ return {
1064
+ backgroundImage: `url(${sectionBackgroundImage?.embedURL})`
1065
+ };
1066
+ } else if (typeof sectionBackgroundImage === "string") {
1067
+ return {
1068
+ backgroundImage: `url(${sectionBackgroundImage})`
1069
+ };
1070
+ }
1065
1071
  } else {
1066
- return {
1067
- backgroundImage: "none"
1068
- };
1072
+ return {};
1069
1073
  }
1070
1074
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "11.1.4",
3
+ "version": "11.1.7",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"