Autumn Note
A zero-dependency WYSIWYG editor — no jQuery, no framework required.
Almost every internal system has one place that needs formatted input: a CMS, a knowledge base, a support form, an email composer. The familiar options all carry a cost — Summernote needs jQuery, TinyMCE and Froala charge for advanced features, and all of them are heavy for a component that shows up everywhere in a product. Autumn Note is written in plain vanilla ES2022 JavaScript and ships both an ES Module (tree-shakeable) and a UMD build usable straight from a script tag, with TypeScript definitions included. Since v2.1.0 the package imports cleanly under server-side rendering — previously reading `navigator` at module load made `import` throw on Node, which left the React and Vue wrappers unusable with Next.js and Nuxt.
- Markdown shortcuts — typing
#,>or-then a space becomes a heading, blockquote, or list - A bubble toolbar that floats above the current selection, cutting the distance your eyes travel
- @mention autocomplete via an
onSearchcallback — tag a user or link to an entity in your system - Find & Replace with regex mode (Ctrl+F / Ctrl+H) — usually missing from lightweight editors
- A DOM-based sanitizer on paste, on
setHTML(), and before export — strips<script>,on*attributes,javascript:URLs - Since v2.1.0 the sanitizer also closes two classes of mutation XSS: SVG animation elements (
<animate>and relatives, which rewrite an attribute *after* filtering finishes) and MathML namespace-switching points; URL filtering now coversposter,backgroundandsrcset, the last validated candidate by candidate - The toolbar is a single tab stop rather than 39, via
role="toolbar"and a roving tabindex; toggle buttons exposearia-pressedso screen readers can report their state - Auto-save to localStorage with a restore banner, plus inline image crop and resize — the resize handles run on pointer events, so touch and pen work too
- Eight built-in locales including Vietnamese; since v2.0.0 each is importable on its own via
autumnnote/i18n/vi, with type declarations - A minimal build,
autumnnote/core(v2.5.0) — loads only the modules you actually use instead of pulling in all 23 even when you need nothing but bold and italic - The Markdown converter and HTML sanitiser are exported (v2.5.0):
markdownToHTML,htmlToMarkdownandsanitiseHTMLwork without a DOM, so they run on a server or in a build step onImageUploadcan return the uploaded URL (v2.5.0) — the editor shows a local preview immediately and swaps in the real URL when it lands, instead of leaving every integration to insert the image itselfcspNoncefor the two optional CDN assets (v2.7.0), so the editor works under a strict Content Security Policy
Replaces: Summernote · Quill · TinyMCE · Froala · CKEditor
npm install autumnnoteimport AutumnNote from "autumnnote";
const editor = AutumnNote.create("#editor", { height: 300 });
editor.setHTML("<p>Xin chào</p>");autumnnote-react v2.7.1Vue 3 · autumnnote-vue v2.7.1