A 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.
- โก No dependencies โ Optimized for speed and simplicity
- ๐งฉ Modular architecture โ Enable only the plugins you need
- ๐ฑ Responsive UI โ Works smoothly on all modern devices
- ๐ Framework-friendly โ Easy to use with React, Vue, Svelte, etc.
- ๐ผ Feature-rich plugin ecosystem, including:
- ๐ท @Mentions with autocomplete
- ๐จ Advanced table editing & custom layouts
- ๐งฎ Math (LaTeX), drawing, and code block support
- ๐ Built-in media galleries (image, video, audio, file)
- ๐ PDF export, templates, and embedded content (audio/video/iframe)
๐ค Explore all plugins
โญ 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) | |
| 121 (Dec 2023) | |
| 17.0 (Sep 2023) | |
| 105 (Nov 2023) | |
| 119 (Oct 2023) | |
| 23.0 (Oct 2023) | |
| 128 (Jul 2024) |
โ Not Supported : IE, Legacy Edge
- 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.
* 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 --saveimport 'suneditor/dist/suneditor.min.css';
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>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.
suneditor.create('#editor', {
plugins: ['font', 'image', 'video'],
image: {
uploadUrl: 'https://upload.image'
}
});๐ 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.