Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix: Lightbox paste partial support (#3744)

Ivan Starkov19c95fe9f089
diff --git a/apps/builder/app/shared/copy-paste/plugin-webflow/instances-properties.ts b/apps/builder/app/shared/copy-paste/plugin-webflow/instances-properties.ts
index 6138b4afcb..7b3e1489ff 100644
--- a/apps/builder/app/shared/copy-paste/plugin-webflow/instances-properties.ts
+++ b/apps/builder/app/shared/copy-paste/plugin-webflow/instances-properties.ts
@@ -345,7 +345,12 @@ const toFragment = (
addInstance(component);
return fragment;
}
-
+ case "LightboxWrapper": {
+ addProp("tag", wfNode.tag);
+ addProp("href", wfNode.data?.attr?.href);
+ addInstance("Box", [], component);
+ return fragment;
+ }
case "NavbarMenu": {
addProp("tag", wfNode.tag);
addProp("role", wfNode.data?.attr?.role);
diff --git a/apps/builder/app/shared/copy-paste/plugin-webflow/schema.ts b/apps/builder/app/shared/copy-paste/plugin-webflow/schema.ts
index 2797aacb9e..b6b00f8f7e 100644
--- a/apps/builder/app/shared/copy-paste/plugin-webflow/schema.ts
+++ b/apps/builder/app/shared/copy-paste/plugin-webflow/schema.ts
@@ -1,6 +1,8 @@
import { z } from "zod";
-const Attr = z.object({ id: z.string(), role: z.string() }).partial();
+const Attr = z
+ .object({ id: z.string(), role: z.string(), href: z.string() })
+ .partial();
const styleBase = z.string();
@@ -124,6 +126,7 @@ export const wfNodeTypes = [
"NavbarButton",
"NavbarContainer",
"Icon",
+ "LightboxWrapper",
] as const;
const WfElementNode = z.union([
@@ -139,6 +142,7 @@ const WfElementNode = z.union([
}),
}),
+ WfBaseNode.extend({ type: z.enum(["LightboxWrapper"]) }),
WfBaseNode.extend({ type: z.enum(["NavbarMenu"]) }),
WfBaseNode.extend({ type: z.enum(["NavbarContainer"]) }),