Add a rich text editor to a web form or comment section without building one from scratch.
Let users format messages, articles, or notes with bold, italic, lists, and links through a visual toolbar.
Replace plain textarea inputs with a professional WYSIWYG editor that generates clean HTML automatically.
Trix is a WYSIWYG (What You See Is What You Get) rich text editor for web applications, built by 37signals, the company behind Basecamp and Ruby on Rails. WYSIWYG means users can format their writing through a toolbar (bold, italic, headings, lists, links, attachments) and see the formatted result as they type, rather than writing raw HTML or markdown. Trix is designed for everyday writing tasks like messages, comments, and articles, and it powers the text editor inside Basecamp itself. What makes Trix architecturally different from older editors is how it handles user input. Most rich text editors at the time Trix was created were thin wrappers around the browser's built-in editing APIs (called contenteditable and execCommand), which were inconsistent across browsers and full of edge-case bugs. Trix bypasses those APIs by maintaining its own internal document model, every keystroke or formatting action goes through Trix's own logic, which then re-renders the document. This gives it full control over the editing experience and produces clean, consistent HTML output regardless of the browser. Adding Trix to a web page is done by loading a stylesheet and script from a CDN, then placing a single custom HTML element tag where the editor should appear. Trix automatically generates a toolbar and links itself to an HTML form field, making integration straightforward. The toolbar is configurable, and custom toolbar buttons can trigger custom actions. Trix is built with modern web standards including Custom Elements and works in all current desktop and mobile browsers. It is written in JavaScript and available as an npm package.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.