A lightweight and powerful WYSIWYG editor in vanilla JavaScript. No dependencies.
See the codeA lightweight and powerful WYSIWYG editor built with vanilla JavaScript
SunEditor supports all modern browsers without dependencies or polyfills.
SunEditor is a lightweight, fast, and extensible WYSIWYG editor written in pure JavaScript.
It's easy to integrate, highly customizable, and built for modern web applications.
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
strictModeconfiguration in the Architecture Guide.
π€ Try all plugins in Playground
β Contributions welcome! Please refer to Contribution Guidelines and check out our open tasks. β
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 |
|---|---|
| 119 (Oct 2023) | |
| 119 (Nov 2023) | |
| 125 (Apr 2024) | |
| 17.2 (Dec 2023) | |
| 105 (Nov 2023) | |
| 119 (Oct 2023) | |
| 23.0 (Oct 2023) | |
| 128 (Jul 2024) |
β Not Supported : IE, Legacy Edge
* 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
π‘ Want to see it in action?
Check out the π€ Live Demo π€ with full options and examples.
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
});
<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>
You can use the official wrappers for easier integration:
React β suneditor-react
Vue β suneditor-vue
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 β
π€ Want to build plugins? Get real-time help from SunEditor Devs AI.
See Contribution Guide for tips and examples.
SunEditor is an open-source project available under the MIT License.
356 followers Β· starred Aug 2026
70 followers Β· starred Dec 2022
68 followers Β· starred Nov 2025
132 followers Β· starred Sep 2022
A lightweight and powerful WYSIWYG editor in vanilla JavaScript. No dependencies.
See the codeA lightweight and powerful WYSIWYG editor built with vanilla JavaScript
SunEditor supports all modern browsers without dependencies or polyfills.
SunEditor is a lightweight, fast, and extensible WYSIWYG editor written in pure JavaScript.
It's easy to integrate, highly customizable, and built for modern web applications.
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
strictModeconfiguration in the Architecture Guide.
π€ Try all plugins in Playground
β Contributions welcome! Please refer to Contribution Guidelines and check out our open tasks. β
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 |
|---|---|
| 119 (Oct 2023) | |
| 119 (Nov 2023) | |
| 125 (Apr 2024) | |
| 17.2 (Dec 2023) | |
| 105 (Nov 2023) | |
| 119 (Oct 2023) | |
| 23.0 (Oct 2023) | |
| 128 (Jul 2024) |
β Not Supported : IE, Legacy Edge
* 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
π‘ Want to see it in action?
Check out the π€ Live Demo π€ with full options and examples.
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
});
<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>
You can use the official wrappers for easier integration:
React β suneditor-react
Vue β suneditor-vue
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 β
π€ Want to build plugins? Get real-time help from SunEditor Devs AI.
See Contribution Guide for tips and examples.
SunEditor is an open-source project available under the MIT License.
356 followers Β· starred Aug 2026
70 followers Β· starred Dec 2022
68 followers Β· starred Nov 2025
132 followers Β· starred Sep 2022