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.

inline create instance

Oleg Isonen35b45a1e9694
diff --git a/app/canvas/features/wrapper-component/text-editor/example-text-editor.tsx b/app/canvas/features/wrapper-component/text-editor/example-text-editor.tsx
index 589f67df9d..e14d123ece 100644
--- a/app/canvas/features/wrapper-component/text-editor/example-text-editor.tsx
+++ b/app/canvas/features/wrapper-component/text-editor/example-text-editor.tsx
@@ -27,10 +27,9 @@ const Menu = () => {
>
<Button
onClick={() => {
- const instance = createInstance({ component: "Bold" });
publish({
type: "insertInlineInstance",
- payload: instance,
+ payload: createInstance({ component: "Bold" }),
});
}}
>
@@ -38,10 +37,9 @@ const Menu = () => {
</Button>
<Button
onClick={() => {
- const instance = createInstance({ component: "Italic" });
publish({
type: "insertInlineInstance",
- payload: instance,
+ payload: createInstance({ component: "Italic" }),
});
}}
>