๐ŸŒž 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 master branch. 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-all to auto-fix formatting issues

๐Ÿงฉ Plugin Development

SunEditor supports a modular plugin architecture where features can be enabled/disabled as needed.

Getting Started

  1. Read the documentation:

  2. Explore existing examples:

  3. Create your plugin:

    • Extend the appropriate plugin interface class (e.g., PluginCommand, PluginModal, PluginDropdown) from src/interfaces/plugins.js
    • Implement required methods (action(), open(), etc.)
    • Add static properties (key, type, className)
    • Export and register in options

๐Ÿ” 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 release branch.
  • 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:

๐Ÿ’ก Feel free to propose wrappers for other frameworks too!


๐Ÿ”ง Development Setup

Essential Commands

guide@Essential Command

Claude Code Skills

This project includes slash commands for Claude Code (.claude/skills/):

CommandDescription
/post-editRun post-edit pipeline: lint โ†’ ts-build โ†’ check โ†’ test
/reviewCode review for bugs, logic errors, dead code
/changesAnalyze git diff and update changes.md (for manual edits only)
/release-noteConvert 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

TypeUsageExample
featNew featurefeat: add image edit tool
fixBug fixfix: resolve table merge issue
refactorCode refactoring (no functional change)refactor: improve toolbar render logic
perfPerformance optimizationperf: optimize cursor position restore
docsDocumentation changes (README, comments, etc.)docs: add README usage example
styleCode style changes (formatting, semicolons)style: fix indentation and whitespace
testAdd or modify teststest: add merge case unit test
choreBuild setup, package management, misc taskschore: clean webpack config
ciCI/CD configuration changesci: add GitHub Actions deploy workflow
buildBuild system changesbuild: update babel to latest version

Issue Linking

Connect commits to issues using these formats:

FormatExampleDescription
feat(#1234): ...feat(#1541): add table mergeConventional Commits (tool-friendly)
fix: #1234 ...fix: #1541 resolve paste errorSimple 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 #1234 or Fixes #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!