Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. JavaScript
  3. Squire

Squire

MITTypeScript

A lightweight, dependency-free HTML5 rich text editor designed to handle arbitrary HTML with powerful cross-browser normalization.

GitHubGitHub
4.9k stars413 forks0 contributors

What is Squire?

Squire is an HTML5 rich text editor that provides robust cross-browser normalization in a flexible, lightweight package. It was originally designed for email composition, requiring it to handle arbitrary HTML from third-party emails without breaking formatting, making HTML the source of truth. Unlike many modern editors, it avoids a structured internal data model to preserve complex HTML, excelling particularly with multiple levels of blockquotes.

Target Audience

Developers building web-based email clients or applications that need to handle and edit arbitrary HTML content, such as email forwarding, quoting, or rich text composition with complex formatting. It is also suitable for projects requiring a lightweight, dependency-free editor component that can be integrated with custom UI toolbars.

Value Proposition

Developers choose Squire for its ability to preserve arbitrary HTML without sanitization limitations, its lightweight size (16KB minified and gzipped with no dependencies), and its specialized handling of nested blockquotes. It provides a core editing engine without built-in UI, allowing seamless integration with custom application interfaces and avoiding the bloat of dual UI toolkits.

Overview

The rich text editor for arbitrary HTML.

Use Cases

Best For

  • Building web-based email composition interfaces that need to forward or quote third-party HTML emails without breaking formatting.
  • Integrating a lightweight, dependency-free rich text editor into custom UI frameworks without built-in toolbar bloat.
  • Handling complex nested blockquote structures in rich text editing scenarios.
  • Applications requiring programmatic control over rich text formatting with extensive API methods for customization.
  • Projects that prioritize cross-browser normalization for consistent rich text editing behavior across modern browsers.
  • Use cases where arbitrary HTML input must be preserved as the source of truth, avoiding structured data model limitations.

Not Ideal For

  • Projects needing an out-of-the-box rich text editor with pre-built UI components like toolbars and dialogs
  • Applications where automatic, enforced HTML sanitization is critical for security without additional configuration
  • Use cases requiring a structured content model (e.g., JSON or Markdown) for integration with modern frontend frameworks or APIs

Pros & Cons

Pros

Lightweight and Dependency-Free

At only 16KB minified and gzipped with no dependencies, Squire significantly reduces bundle size and load times, as emphasized in the README.

Arbitrary HTML Preservation

Designed for email forwarding, it handles any HTML input without breaking formatting, making it ideal for third-party content where HTML is the source of truth.

Excellent Blockquote Handling

Specializes in managing multiple nested blockquote levels, a key requirement for email composition apps like Fastmail, as noted in the project description.

Cross-Browser Normalization

Intervenes only where browser behavior deviates, ensuring consistent editing across all reasonably recent browsers without relying on heavy polyfills or execCommand.

Cons

No Built-in UI

Provides only the core editing engine, requiring developers to build and integrate custom toolbars and interface elements from scratch, increasing development overhead.

Security Configuration Required

Relies on external sanitization like DOMPurify or a custom sanitizeToDOMFragment function, adding setup complexity and potential risks if not properly implemented.

Steep Integration Effort

As a low-level component, it demands deeper knowledge of DOM manipulation and more custom code to create a full-featured editor compared to all-in-one solutions.

Frequently Asked Questions

Quick Stats

Stars4,910
Forks413
Contributors0
Open Issues52
Last commit13 days ago
CreatedSince 2011

Tags

#web-components#cross-browser#html5#lightweight#ui-integration#contenteditable#javascript-library#rich-text-editor#no-dependencies

Built With

J
JavaScript
H
HTML5

Included in

JavaScript34.9kText Editing296
Auto-fetched 10 hours ago

Related Projects

quillquill

Quill is a modern WYSIWYG editor built for compatibility and extensibility

Stars47,328
Forks3,668
Last commit1 year ago
TipTapTipTap

The headless rich text editor framework for web artisans.

Stars38,298
Forks3,111
Last commit3 days ago
SlateSlate

A completely customizable framework for building rich text editors. (Currently in beta.)

Stars31,754
Forks3,303
Last commit5 days ago
CodeMirrorCodeMirror

In-browser code editor (version 5, legacy)

Stars27,230
Forks4,929
Last commit4 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub