Trix
trix-editor.org
What it is
Trix is a free, open-source WYSIWYG editor for composing messages, comments, articles, and lists in web applications. It uses an internal document model that turns editing into operations and renders the result as terse, consistent HTML. Default formatting covers bold, italic, links, strikethrough, headings, quotes, code, and bulleted or numbered lists. Users can drop or paste files; the host application must upload them and supply permanent URLs. GIF, PNG, WebP, JPG, and JPEG attachments receive automatic previews. Trix supports unlimited undo and redo, form integration through a changing hidden input, and toolbar customization through events and data attributes. It sanitizes content with DOMPurify, while its documentation warns that directly inserted untrusted HTML can execute before sanitization. The editor supports accessible names through label, aria-label, and aria-labelledby attributes. It runs in evergreen desktop and mobile browsers and is available through npm, npm CDN, ESM, and UMD.
Spec sheet
- Purpose
- Trix is a WYSIWYG editor for composing messages, comments, articles, and lists in web applications.Read 9 Oct 2026 · trix-editor.org
- License
- The GitHub project identifies Trix as an open-source project and lists an MIT license.Read 9 Oct 2026 · github.com
- Founded
- 2014Read 28 Sep 2026 · trix-editor.org
- Maker
- Trix is made by 37signals, the creators of Ruby on Rails.Read 9 Oct 2026 · github.com
- Accessibility
- The editor supports labels, aria-label, and aria-labelledby attributes for an accessible name.Read 9 Oct 2026 · github.com
- Attachment previews
- Trix automatically previews GIF, PNG, WebP, JPG, and JPEG attachments by default.Read 9 Oct 2026 · github.com
- Attachments
- Trix accepts files dropped or pasted into the editor, but the application must upload them and provide a permanent URL.Read 9 Oct 2026 · github.com
- Attachments and HTML
- Trix supports embedded attachments and outputs terse, consistent HTML.Read 9 Oct 2026 · trix-editor.org
- Browser support
- Trix supports evergreen, self-updating desktop and mobile browsers.Read 9 Oct 2026 · github.com
- Customization
- Developers can customize the toolbar and add external actions through editor events and data attributes.Read 9 Oct 2026 · github.com
- Document model
- It uses an internal document model to turn editor input into editing operations and render the document back into the editor.Read 9 Oct 2026 · github.com
- Formatting
- Default formatting includes bold, italic, links, strikethrough, headings, quotes, code, and bulleted and numbered lists.Read 9 Oct 2026 · github.com
- Forms
- Trix can integrate with forms and update an associated hidden input whenever editor content changes.Read 9 Oct 2026 · github.com
- Installation
- Trix is available in ESM and UMD formats, can be included from an npm CDN, or installed as an npm package.Read 9 Oct 2026 · github.com
- Integration
- Trix can be included from an npm CDN or installed as an npm package, and is bundled in ESM and UMD formats.Read 9 Oct 2026 · github.com
- Open source
- The project is open source and its GitHub repository identifies an MIT license.Read 9 Oct 2026 · github.com
- Output
- It uses a document model, supports embedded attachments, and outputs terse, consistent HTML.Read 9 Oct 2026 · trix-editor.org
- Sanitization
- Trix uses DOMPurify to sanitize editor content.Read 9 Oct 2026 · github.com
- Security guidance
- The documentation warns that untrusted HTML placed directly inside a trix-editor can execute before Trix sanitizes the editor value.Read 9 Oct 2026 · github.com
- Undo and redo
- Editors support unlimited undo and redo.Read 9 Oct 2026 · github.com
Plans and prices
Strong points and limits
Strong points
- Free MIT-licensed open-source project
- Supports rich formatting and structured HTML
- Unlimited undo and redo
- Automatic previews for common image files
- Available as npm, ESM, and UMD
Limits
- Host application must upload attachments
- Untrusted inserted HTML can execute before sanitization
- Web browsers are the listed platform
Who it suits
Trix suits developers adding structured rich-text editing to web applications, especially when open-source licensing, browser delivery, attachments, and form integration matter.
Verdict
Trix provides a focused, embeddable editor with structured output, attachments, accessibility attributes, and broad browser support. Its integration model requires your application to handle uploaded files and avoid inserting untrusted HTML directly.
Where Specifiction places it
- Rich Text Editor Software#21 of 377.5