suneditor is a free, open source content management systems (cms) project written in JavaScript and released under MIT. It has 2,021 GitHub stars, 348 forks and 3 open issues, and was last pushed 39 hours ago. On this registry it ranks #37 of 68 tracked projects in Content Management Systems (CMS), with 5 head-to-head comparisons available.

What is suneditor?

SunEditor is a modular, MIT-licensed WYSIWYG HTML editor written in JavaScript with zero runtime dependencies, built for developers who need a complete, ready-to-use editor for a CMS, admin panel, back office or form rather than an engine they must assemble themselves.

What it is

SunEditor is a browser-based rich text editor distributed as a JavaScript library with bundled TypeScript type definitions for its options, plugins and public API. It ships the whole editing surface — toolbar, dialogs, menus, tables, media handling and file uploads — in a single package that has no runtime dependencies, no polyfills and no peer dependencies. It works with React, Vue, Angular, Svelte or plain HTML, so it fits into the JavaScript ecosystem without dictating a framework.

The problem it solves is assembly work. Headless editor frameworks provide a document engine and leave the toolbar, dialogs, table editing and media handling for the integrating team to build. SunEditor targets the opposite case: a team needs a finished HTML editor inside a CMS, admin panel, board, product description form or email form, and needs it working quickly. Its output is HTML rather than a document model, which keeps it aligned with how content management systems and back-office applications store and render content.

Key capabilities

  • Built-in handling for tables, images, video, audio and files, including resize, alignment, captions, galleries and uploads.
  • A GFM Markdown view alongside LaTeX math and code blocks with a language selector.
  • Slash commands through a / command menu, plus drag handles for moving blocks.
  • Opt-in plugins for mentions, find and replace, templates, PDF export and drawing.
  • Bundled TypeScript definitions covering options, plugins and the public API.
  • A strictMode configuration for projects that need raw HTML editing instead of the default validation and auto-correction of structured content.
  • Zero runtime dependencies, with no polyfills or peer dependencies shipped by default.

Who uses it and how

  • Content teams entering articles and documentation into a CMS, where structured content is validated and auto-corrected to stay consistent.
  • Back-office and admin panel developers who need a working editor in the time it takes to make one create() call rather than to build a UI.
  • Product and commerce teams using it for product descriptions, and operations teams embedding it in email forms.
  • Front-end teams on React, Vue, Angular, Svelte or plain JavaScript who want the same editor across frameworks without adopting a framework-specific wrapper.
  • Projects that must avoid dependency chains, since there are no peer dependencies or polyfills to reconcile with an existing stack.

Getting started

The documentation site at suneditor.com provides a Get Started guide and a live playground at suneditor.com/playground where all plugins can be tried. The first working editor is a single create() call.

How it compares

Against headless editor frameworks such as Tiptap, Lexical and ProseMirror, SunEditor supplies the toolbar, dialogs, menus and media UI that those frameworks expect you to build, and it emits HTML rather than a document model. Against CKEditor, it is aimed at general CMS and form editing rather than enterprise document workflows that require comments, track changes and vendor support.

When to use it — and when not to

Because it is a client-side library, there is no database, storage or SMTP service to operate, but the host application still owns uploads and persistence, and the editor ships without polyfills, so it requires modern browsers (Chrome and Edge 119+, Firefox 125+, Safari 17.2+, Opera 105+, Android WebView 119+). It is a poor fit for Notion-like block products, deeply custom node interfaces or collaboration-first editors, where Tiptap or Lexical are the better choice, and for enterprise document workflows needing comments, track changes and vendor support. Teams that must edit arbitrary raw HTML should also note that the editor is optimized for structured content and auto-corrects it by default.

project readme (upstream, from github) — read inline

SunEditor

A modular WYSIWYG HTML editor with zero runtime dependencies.
Everything included. Enable only what you need.

GitHub License npm npm monthly downloads jsDelivr CDN Test coverage

Live Playground · Documentation · Get Started · Frameworks

  • Tables, images, video, audio and files — resize, align, captions, galleries and uploads built in
  • Markdown, math and code blocks — GFM Markdown view, LaTeX math, code blocks with a language selector
  • Slash commands and block handles — / command menu, drag handles to move blocks
  • Mentions, find & replace, templates, PDF export, drawing — and more, as opt-in plugins
  • TypeScript — bundled type definitions for options, plugins and the public API
  • Works with any framework — React, Vue, Angular, Svelte or plain HTML
  • MIT License — free for commercial use, no account or cloud service required
  • Zero runtime dependencies — no polyfills, no peer dependencies

🤔 Need an editor, not an editor framework?

Headless editor frameworks (Tiptap, Lexical, ProseMirror) give you an engine and leave the toolbar, dialogs, tables and media handling for you to build. That is the right choice when the editor is your product.

SunEditor is for the other case: you need a complete HTML editor in a CMS, admin panel, back office, board, product description or email form — and you need it today.

SunEditor Headless editor framework
Toolbar, dialogs, menus Built in You build them
Tables, images, media, files Built in Extensions + your own UI
Output HTML Document model (HTML via a serializer)
First working editor One create() call Engine setup + your own UI
Best for CMS, admin, back office, forms Notion-like or highly custom editors

When SunEditor is not the best fit: Notion-like block products, deeply custom node UIs, or collaboration-first editors are better served by Tiptap or Lexical. Enterprise document workflows that need comments, track changes and vendor support are better served by CKEditor.

📝 Content Editing Approach

SunEditor is optimized for structured content (articles, documentation, emails) rather than arbitrary HTML editing. Content is validated and auto-corrected to maintain consistency.

For raw HTML editing needs, see strictMode configuration in the Architecture Guide.

🌤 Try all plugins in Playground

⭐ If SunEditor saves you time, a GitHub star helps other developers find it.

🤝 Contributions welcome! See the Contribution Guidelines and the good first issue / help wanted issues.


🌍 Browser Support

SunEditor is built to take advantage of modern browser capabilities.
It does not ship with polyfills by default, but you can add them if your project requires broader compatibility.

Works correctly on the following versions or newer.

Browser ≥ Version
Chrome 119 (Oct 2023)
Edge 119 (Nov 2023)
Firefox 125 (Apr 2024)
Safari (macOS, iOS) 17.2 (Dec 2023)
Opera 105 (Nov 2023)
Android WebView 119 (Oct 2023)
Samsung Internet 23.0 (Oct 2023)
Firefox ESR 128 (Jul 2024)

❌ Not Supported : IE, Legacy Edge

📌 Why This Baseline? (Late 2023)

  • This is based on features commonly supported by modern browsers.
  • Most modern web APIs and CSS features are supported reliably in versions after this point.
  • Unless specific compatibility issues arise, you can use it out of the box without additional polyfills.
  • If you need support for older browsers, you can extend it by adding your own polyfills.

📦 Legacy Version (v2-legacy)

* Supported IE11

SunEditor v3 is the latest version.
This section refers to the previous stable version, SunEditor v2.

The v2-legacy branch is no longer actively maintained,
but still available for compatibility with older projects.

👉 v2-legacy branch


🚀 Install & Quick Start

💡 Want to see it in action?
Check out the 🌤 Live Demo 🌤 with full options and examples.

NPM

npm install suneditor --save
import 'suneditor/css/editor'; // Editor UI
import 'suneditor/css/contents'; // For displaying HTML
import suneditor from 'suneditor';

// HTML: <div id="editor"></div> or <textarea id="editor"></textarea>
suneditor.create(document.querySelector('#editor'), {
	// options
});

CDN (jsDelivr)

<script src="https://cdn.jsdelivr.net/npm/suneditor@latest/dist/suneditor.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/suneditor@latest/dist/suneditor.min.css" rel="stylesheet" />
<!-- Optional language (default is English): e.g., Korean (ko) -->
<!-- <script src="https://cdn.jsdelivr.net/npm/suneditor@latest/src/langs/ko.js"></script> -->

<div id="editor"></div>
<!-- or <textarea id="editor"></textarea> -->

<script>
	SUNEDITOR.create(document.querySelector('#editor'), {
		// options
	});
</script>

🔧 Framework Integration

You can use the official wrappers for easier integration:

React – suneditor-react
Vue – suneditor-vue


📦 Plugins

SunEditor supports a plugin-based architecture.
You can enable only the plugins you need or even create your own custom ones.

Pass the plugins you want as an array of plugin classes:

import suneditor from 'suneditor';
import { font, image, video } from 'suneditor/plugins';

suneditor.create('#editor', {
	plugins: [font, image, video],
	image: {
		uploadUrl: 'https://upload.image',
	},
});

An object keyed by plugin name works too, and excludedPlugins lets you drop individual plugins when you enable the whole set:

import plugins from 'suneditor/plugins';

suneditor.create('#editor', {
	plugins, // every built-in plugin
	excludedPlugins: ['image', 'video'],
});

📘 Learn how to build your own plugin →

Community plugins

Package Naming Published by
Official @suneditor/ (e.g. @suneditor/plugin-mermaid) The suneditor organization only
Community suneditor-plugin- or @/suneditor-plugin- Anyone

Add the suneditor and suneditor-plugin keywords so others can find your plugin, and share it in Discussions → Show and tell.

🤖 Want to build plugins? Get real-time help from SunEditor Devs AI.
See Contribution Guide for tips and examples.


✨ Contributors

contributors

💎 Sponsors

Backers

Backers on Open Collective

Sponsors

Sponsors on Open Collective


🔒 Security

SunEditor sanitizes HTML on input, paste and Code View, and an XSS regression corpus runs with the unit test suite in CI. Please report vulnerabilities privately — see the Security Policy.


📄 License

SunEditor is an open-source project available under the MIT License.

Frequently asked questions

Is suneditor free to use?

suneditor is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does suneditor do?

A modular WYSIWYG HTML editor with zero runtime dependencies. Everything included, enable only what you need.

What is suneditor written in?

suneditor is primarily written in JavaScript. Its source is publicly available at https://github.com/JiHong88/suneditor, and it has 2,021 GitHub stars.