๐ Guidelines For Contributing
April 11, 2026 ยท View on GitHub
๐ Introduction
The codebase is written in JavaScript, using JSDoc for type definitions. Node.js v22 recommended, minimum v14+ is required to build and test.
๐ Notes
- 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
๐ Before Submitting an Issue
- 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.
โ Before Submitting a PR
- 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.
๐ค How to Contribute
We welcome code contributions, bug reports, documentation improvements, or plugin ideas!
๐งน Code Formatting
- Use the provided ESLint configuration.
- 4-space indentation
- Single quotes (
') for strings - Run
npm run lint:fix-allto auto-fix formatting issues
๐งฉ Plugin Development
SunEditor supports a modular plugin architecture where features can be enabled/disabled as needed.
Getting Started
-
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.,
๐ CI/CD
- 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.
โ๏ธ Framework Guide
If you're contributing to framework integrations:
- React: suneditor-react
- Vue: suneditor-vue
๐ก Feel free to propose wrappers for other frameworks too!
๐ง Development Setup
Essential Commands
Claude Code Skills
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 |
๐ค AI Plugin Helper
Need real-time help?
Check out SunEditor Devs AI โ
๐ก Just paste your code or describe your plugin idea โ and get instant support.
๐๏ธ Architecture Guide
- 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:
๐ Commit Message Convention
We follow Conventional Commits style for clear and consistent commit history.
Commit Types
| 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 |
Issue Linking
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 |
Writing Tips
- 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
Example
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!