This repository provides a fully client-side campaign editor that can be embedded on any HTML page as a single script and root element. It includes a drag-and-drop template builder, marketing template library (100+ presets), workflow controls, commenting, audit trails, and HTML/MJML export utilities.
- Open
index.htmlin a browser. - The editor will initialize against the
#campaign-editorelement viawindow.CampaignEditor.init. - Customize the
initcall to set the mounting selector, current user, and branding.
<div id="campaign-editor"></div>
<script src="assets/editor.js"></script>
<script>
window.CampaignEditor.init({
selector: '#campaign-editor',
currentUser: { name: 'Avery Editor', role: 'editor' },
apiBaseUrl: 'https://api.example.com',
branding: { accent: '#22d3ee', secondary: '#a855f7' }
});
</script>- No-code drag-and-drop builder for headings, paragraphs, images, buttons, spacers/dividers, and 1–3 column layouts with inline style controls.
- Template library (100+) with categories, search, quick loading, cloning, and workspace saves.
- Campaign workflow metadata form, status transitions (draft → in_review → approved → ready), and role-aware actions.
- Collaboration tools including comment threads and audit history of status changes.
- Export to responsive HTML or MJML with download and clipboard options.
- Embeddable widget that mounts onto any page with a single root element.
All data is stored client-side for the demo. Wire the component to your APIs by swapping the template and campaign loaders/savers inside assets/editor.js.
Contributions are welcome. Start with an issue, read CONTRIBUTING.md, and use the issue templates for bugs or feature proposals. Good first contributions include accessibility improvements, export fixtures, and storage-adapter examples.
Released under the MIT License.