JSPM

suneditor

3.0.0-beta.20
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 35821
  • Score
    100M100P100Q150657F
  • License MIT

Vanilla javascript based WYSIWYG web editor

Package Exports

  • suneditor
  • suneditor/src/plugins
  • suneditor/src/plugins/command/blockquote
  • suneditor/src/plugins/command/blockquote.js
  • suneditor/src/plugins/index.js
  • suneditor/src/suneditor.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (suneditor) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

SunEditor

A lightweight and powerful WYSIWYG editor built with vanilla JavaScript

GitHub License npm npm weekly downloads jsDelivr CDN

SunEditor supports all modern browsers without dependencies or polyfills.

🌟 Why SunEditor?

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.

Key Features

  • 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. ⭐


🌍 Browser Support

Browser Since Version ≥
Chrome Feb 2020 80
Firefox Jul 2021 90
Safari Apr 2021 14.1
Edge Jan 2020 80
Opera Feb 2020 67
iOS Safari Apr 2021 14.5
Android WebView Feb 2020 80
Samsung Internet Apr 2020 13.0

❌ Not Supported : IE, Legacy Edge

SunEditor is designed for modern browsers released since 2020.
This includes support for ES2020+ features like optional chaining (?.), nullish coalescing (??), and private class fields (#field).


📦 Legacy Version (v2-legacy)

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/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>

🔧 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.

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.


✨ Contributors

contributors

📄 License

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