The codebase is written in JavaScript, using JSDoc for type definitions. Node.js v22 recommended, minimum v14+ is required to build and test.
- Polyfills are not included. Make sure your target environment (browser or runtime) natively supports these features.
- Target ECMAScript version: ES2022
- Supported browsers: See Browser Support
- Make sure you're using the latest
masterbranch. Your issue may already be fixed. - Search the open issues and closed issues to avoid duplicates.
- If your issue is new, file a ticket with detailed info, including reproduction steps if possible.
- Check that no one is working on the same thing in open issues.
- For new features or major changes, please open an issue first to gather feedback.
- Use a feature branch (not
master) for your pull request. - Make sure your code passes tests and doesn't break existing functionality.
- Follow the Commit Message Convention below.
We welcome code contributions, bug reports, documentation improvements, or plugin ideas!
- Use the provided ESLint configuration.
- 4-space indentation
- Single quotes (
') for strings - Run
npm run lint:fix-allto auto-fix formatting issues
SunEditor supports a modular plugin architecture where features can be enabled/disabled as needed.
-
Read the documentation:
-
Explore existing examples:
- Simple command: src/plugins/command/blockquote.js
- Modal dialog: src/plugins/modal/link.js
- Dropdown menu: src/plugins/dropdown/align.js
-
Create your plugin:
- Extend the appropriate plugin interface class (e.g.,
PluginCommand,PluginModal,PluginDropdown) fromsrc/interfaces/plugins.js - Implement required methods (
action(),open(), etc.) - Add static properties (
key,type,className) - Export and register in options
- Extend the appropriate plugin interface class (e.g.,
- The
dist/folder is not included in the git repository. - It is automatically built and deployed via GitHub Actions after changes are pushed to the
releasebranch. - Do not build or commit
dist/files manually – this may cause merge conflicts. - The CI/CD pipeline ensures clean and consistent builds for every release.
If you're contributing to framework integrations:
- React: suneditor-react
- Vue: suneditor-vue
💡 Feel free to propose wrappers for other frameworks too!
This project includes slash commands for Claude Code (.claude/skills/):
| Command | Description |
|---|---|
/post-edit |
Run post-edit pipeline: lint → ts-build → check → test |
/review |
Code review for bugs, logic errors, dead code |
/changes |
Analyze git diff and update changes.md (for manual edits only) |
/release-note |
Convert changes.md to release note format |
Need real-time help?
Check out SunEditor Devs AI –
💡 Just paste your code or describe your plugin idea – and get instant support.
- ARCHITECTURE.md — Internal engineering deep dive (CoreKernel, Store, Content Model, Event System, Multi-Root)
- GUIDE.md — Developer reference (Plugin System, Modules, Commands, Testing)
Key sections:
We follow Conventional Commits style for clear and consistent commit history.
| Type | Usage | Example |
|---|---|---|
feat |
New feature | feat: add image edit tool |
fix |
Bug fix | fix: resolve table merge issue |
refactor |
Code refactoring (no functional change) | refactor: improve toolbar render logic |
perf |
Performance optimization | perf: optimize cursor position restore |
docs |
Documentation changes (README, comments, etc.) | docs: add README usage example |
style |
Code style changes (formatting, semicolons) | style: fix indentation and whitespace |
test |
Add or modify tests | test: add merge case unit test |
chore |
Build setup, package management, misc tasks | chore: clean webpack config |
ci |
CI/CD configuration changes | ci: add GitHub Actions deploy workflow |
build |
Build system changes | build: update babel to latest version |
Connect commits to issues using these formats:
| Format | Example | Description |
|---|---|---|
feat(#1234): ... |
feat(#1541): add table merge |
Conventional Commits (tool-friendly) |
fix: #1234 ... |
fix: #1541 resolve paste error |
Simple GitHub integration |
- Keep title under 50 characters
- Use lowercase for type
- Omit trailing period
- Leave blank line after title before body (optional)
- Explain what and why in the body
- Link related issues with
Closes #1234orFixes #5678
feat(#1541): add table cell merge functionality
- Implement horizontal and vertical merge
- Add merge/unmerge buttons to table controller
- Update table serialization logic
Closes #1541
Thanks for contributing 💛 You're helping make SunEditor better for everyone!