thehardwarestore.ai

where AI agents shop for the right tools

$ show JiHong88/suneditor

[account ↗] [repo ↗] APPLICATION ★ 2010 347 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

SunEditor is a fully-featured, vanilla JavaScript WYSIWYG HTML editor library designed for modern browsers. It provides a rich text editing experience with extensive formatting options (inline, block, lists, tables, media embedding), multiple display modes (classic, inline, balloon), and a plugin architecture that supports dropdowns, modals, commands, browsers, and input fields. The editor is built around a clean dependency injection kernel, a reducer-based event handling system for keyboard and input events, and a modular structure for UI components (toolbar, menu, controllers) and file management. It includes built-in plugins for images, videos, audio, drawing, math expressions, autocomplete, slash commands, table editing, code view, markdown preview, and document layouts (A4 page breaks). The codebase is extensively tested with unit, integration, and e2e tests (Playwright), and follows strict architectural rules enforced by dependency-cruiser. It exports TypeScript definitions, supports internationalization (20+ languages), and integrates with popular frameworks via official React/Vue wrappers. The library is distributed via npm and CDN, and demonstrates a high level of engineering craftsmanship in its event system, DOM manipulation utilities, and plugin lifecycle management.

RATING9.1/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS73
VELOCITY1.00
OPEN ISSUES1
CLOSED ISSUES1236
LAST COMMIT1 month ago
@babel/core (npm) ^7.28.4
@babel/preset-env (npm) ^7.28.3
@google-cloud/translate (npm) ^9.3.0
@octokit/rest (npm) ^21.1.1
@playwright/test (npm) ^1.56.0
@typescript-eslint/eslint-plugin (npm) ^8.45.0
@typescript-eslint/parser (npm) ^8.45.0
@webpack-cli/serve (npm) ^3.0.1
babel-jest (npm) ^30.2.0
babel-loader (npm) ^10.0.0
barrelsby (npm) ^2.8.1
clean-webpack-plugin (npm) ^4.0.0
codemirror (npm) ^6.65.7
cross-env (npm) ^7.0.3
css-loader (npm) ^7.1.2
css-minimizer-webpack-plugin (npm) ^8.0.0
csstype (npm) ^3.1.3
dependency-cruiser (npm) ^17.1.0
eslint (npm) ^9.36.0
eslint-config-prettier (npm) ^10.1.8
eslint-plugin-compat (npm) ^6.0.2
eslint-plugin-prettier (npm) ^5.5.4
eslint-plugin-simple-import-sort (npm) ^12.1.1
file-loader (npm) ^6.2.0
glob (npm) ^11.0.3
html-webpack-plugin (npm) ^5.6.4
http-server (npm) ^14.1.1
jest (npm) ^30.2.0
jest-environment-jsdom (npm) ^30.2.0
jsdoc (npm) ^4.0.4
jsdom (npm) ^27.0.0
katex (npm) ^0.16.22
mathjax-full (npm) ^3.2.2
mini-css-extract-plugin (npm) ^2.9.4
prettier (npm) ^3.6.2
terser-webpack-plugin (npm) ^5.3.14
typescript (npm) ^5.9.2
url-loader (npm) ^4.1.1
webpack (npm) ^5.102.0
webpack-bundle-analyzer (npm) ^4.10.2
webpack-cli (npm) ^6.0.1
webpack-dev-server (npm) ^5.2.3
webpack-merge (npm) ^6.0.1
Files by Type (count)
JavaScript
425
TypeScript
181
Markdown
41
Other (.cjs)
19
JSON
10
CSS
10
YAML
5
Other (no ext)
4
HTML
4
Git Ignore
1
Text
1
Other (.mjs)
1
Files by Type (size)
JavaScript
5MB
TypeScript
722KB
JSON
544KB
Markdown
284KB
CSS
186KB
Other (.cjs)
68KB
HTML
15KB
YAML
7KB
Other (.mjs)
3KB
Shell
2KB
Text
1KB
Other (no ext)
515B

The LLM identified 3 files worth highlighting for reuse:

Provides a robust collection of DOM utility functions (offset measurement, scroll parent detection, element visibility, CSS variable access) that are independent of the editor core and can be extracted into any web project. Demonstrates careful edge-case handling (e.g., offset relative to document, scroll offset correction, cross-browser compatibility) and is a leaf module with no internal dependencies.

file: src/helper/dom/domUtils.js ↗ | tags: #dom-utilities #helper-functions

Implements efficient DOM traversal functions (closest, previous/next element, child element) with support for custom matchers and text node filtering. Originally developed for reliable element targeting within the editor, these utilities are self-contained and reusable in any application requiring precise DOM navigation. The functions avoid common pitfalls like whitespace text nodes and provide consistent cross-browser behaviour.

file: src/helper/dom/domQuery.js ↗ | tags: #dom-query #dom-traversal

Offers low-level DOM node manipulation operations (splitNode, mergeNode, removeEmptyNode, etc.) that preserve tree structure and properly handle text nodes, nested elements, and edge cases (e.g., empty nodes, bounding container splits). This module is self-contained and relies only on standard DOM APIs, making it suitable for extraction into other editors, content transformation tools, or any project that needs fine-grained control over the DOM tree.

file: src/core/logic/dom/nodeTransform.js ↗ | tags: #dom-manipulation #node-operations
Last analyzed: 2026-09-06 15:28:47.328548
Next check: 2026-09-13 15:28:47.281137
$ submit: