diff --git a/apps/builder/app/shared/copy-paste/plugin-html.ts b/apps/builder/app/shared/copy-paste/plugin-html.ts index e9b5c32ad8fd..beb49fd52476 100644 --- a/apps/builder/app/shared/copy-paste/plugin-html.ts +++ b/apps/builder/app/shared/copy-paste/plugin-html.ts @@ -1,14 +1,20 @@ import { generateFragmentFromHtml } from "../html"; import { insertWebstudioFragmentAt } from "../instance-utils"; +import { generateFragmentFromTailwind } from "../tailwind/tailwind"; import { denormalizeSrcProps } from "./asset-upload"; import type { Plugin } from "./init-copy-paste"; +const inceptionMark = ``; + export const html: Plugin = { name: "html", mimeType: "text/plain", onPaste: async (html: string) => { let fragment = generateFragmentFromHtml(html); fragment = await denormalizeSrcProps(fragment); + if (html.includes(inceptionMark)) { + fragment = await generateFragmentFromTailwind(fragment); + } const result = insertWebstudioFragmentAt(fragment); return result; },