@reacteditor/plugin-tailwind-cdn
v0.0.2
Published
Inject the [Tailwind CSS v4 browser CDN](https://tailwindcss.com/docs/installation/play-cdn) into the React Editor editor iframe so utility classes work without build-time setup.
Readme
plugin-tailwind-cdn
Inject the Tailwind CSS v4 browser CDN into the React Editor editor iframe so utility classes work without build-time setup.
Quick start
npm i @reacteditor/plugin-tailwind-cdnimport { Editor } from "@reacteditor/core";
import createTailwindCdnPlugin from "@reacteditor/plugin-tailwind-cdn";
const tailwindCdn = createTailwindCdnPlugin();
export function Page() {
return <Editor config={config} data={data} plugins={[tailwindCdn]} />;
}The plugin injects:
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>into the iframe's <head> the first time the iframe mounts.
Args
| Param | Example | Type | Status |
| ----------- | --------------------------------------------------------- | ------ | -------- |
| src | https://cdn.jsdelivr.net/npm/@tailwindcss/[email protected] | String | Optional |
Optional args
src
Override the script URL, e.g. to pin a specific version. Defaults to https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4.
Notes
- The CDN bundle is intended for prototyping. For production, build Tailwind into your rendered output instead of relying on the CDN.
- The plugin only affects the editor iframe. Your public
<Render />output still needs Tailwind styles wired in separately.
