Appearance
NPM Package Integration
The plugin loader works in any frontend stack, but loading a script by hand and cleaning it up on unmount is tedious inside a component-based framework. These packages wrap the loader in a component that follows your framework's lifecycle, so the editor mounts and tears down with the component that holds it.
Create your API token first
The packages wrap the editor, not the authorization. The editor still needs the Public API key from Step 1 in Getting Started.
Let your coding agent do it recommended
The fastest way to integrate is to hand the job to your AI coding agent. The official topol-editors-integration skill teaches it the current package API, so it writes the integration from the source of truth instead of from older examples it may have seen.
1. Install the skills in the project that will embed the editor:
claude
/plugin marketplace add TOPOL-io/skills
/plugin install topol-editors@topolbash
npx skills@latest add TOPOL-io/skillsThe skills are plain markdown in TOPOL-io/skills, so you can read what the agent will do before it runs, or point any other agent at the files directly.
2. Ask for the integration, in your own words:
text
Add the Topol email editor to this appThe agent then:
- picks the package for your framework (React, Next.js, Vue, Svelte, or plain JavaScript and TypeScript) and installs it with your package manager,
- mounts the editor in a sized container and wires
onSaveandonEditorError, - reads the API key from your environment configuration instead of hard-coding it,
- runs your type-check and build, and lists what is left for you.
3. Finish what only you can decide. The agent leaves these to you: where saved templates are stored, adding your domain to the token's allowed domains, and opening the page once to see the editor load.
4. Add nonce authentication. It is the setup we recommend before real users open the editor: ask the agent to "add Topol nonce authentication", or follow Nonce Authentication yourself.
Already on the 0.x packages? Ask the agent to "upgrade this app to @topol.io/editor 1.x" and the topol-editors-upgrade-v1 skill takes over; NPM Packages: Upgrading to v1 is the same upgrade written out for people.
Install it yourself
All packages are TypeScript ready and take the same configuration as the plain loader, so anything in this guide applies whichever one you pick.
| Package | Framework |
|---|---|
@topol.io/editor | Plain JavaScript or TypeScript |
@topol.io/editor-react | React |
@topol.io/editor-vue | Vue |
@topol.io/editor-svelte | Svelte |
Installation and usage for each package are documented in its npm README. For Next.js there is a dedicated walkthrough in Next.js integration.
Version 1 of @topol.io/editor, @topol.io/editor-react, @topol.io/editor-vue and @topol.io/editor-svelte embeds Email Editor v4 and also includes the Landing Page Editor.
The Angular package is deprecated
@topol.io/editor-angular is deprecated and is not part of v1. It stays on 0.x, embeds Email Editor v3, and gets no new features. In an Angular app, install @topol.io/editor and create the editor from your component with EmailEditor.init(), calling destroy() in ngOnDestroy. To move an existing integration over, follow NPM Packages: Upgrading to v1.
Upgrading from 0.x?
v1 changes the Email Editor API: EmailEditor.init() returns an instance and callbacks receive a single object. NPM Packages: Upgrading to v1 lists every change.
