lumen-editor and can also be loaded directly from a CDN as an ES module. Choose the method that fits your project’s workflow — both approaches give you the same feature-complete editor with zero runtime dependencies.
Package Manager
Installlumen-editor with the package manager you already use in your project.
CDN / Script Tag
If you are working on a static page or want to prototype without a build tool, you can import Lumen Editor as a native ES module straight from the source files. No bundler, no compilation step.No build step is required when using the CDN approach. Modern browsers support
<script type="module"> natively, so you can open the HTML file directly in a browser or serve it with any static file server.Import the Stylesheet
Regardless of whether you install via a package manager or CDN, you must loadtheme.css. This file contains all toolbar layout styles, editor chrome, and the CSS custom properties that power the light and dark themes. Without it the editor will render without styles.
When installing via npm/yarn/pnpm, import the stylesheet once in your application’s entry file:
node_modules automatically. If your setup does not, reference the file path directly:
Framework Integration
The snippets below show the minimal wiring needed to mount Lumen Editor inside the three most common environments. Because the editor targets a plain DOM element, the integration pattern is the same in every framework: get a reference to the container element, construct anEditor instance, and call destroy() when the component unmounts.
- React
- Vue
- Plain HTML
Use a
useEffect hook to construct the editor after the component mounts and destroy it on cleanup.