Skip to main content
Back

37signals Open-Sources Lexxy, a Smarter Rails Editor Built on Meta's Lexical

37signals open-sources Lexxy, a Lexical-powered rich text editor for Rails that plugs into Action Text as a drop-in Trix alternative

Pro

Repo, Full Access
  • 37signals open-sourced Lexxy, a Rails rich text editor built on Meta's Lexical framework, as a drop-in Action Text alternative to Trix.
  • Already in production at Basecamp, Lexxy powers the company's own products and hundreds of others.
  • Key features over Trix include real-time code syntax highlighting, tables, image galleries, Markdown shortcuts, attachment previews, and a mentions/prompts system.
  • Zero-config Action Text integration: on Rails 8.2+, installing the gem automatically replaces Trix in form.rich_text_area with no model changes needed.
  • Extensible by design: built on Meta's Lexical (used in WhatsApp and Facebook), with an extensions API for custom editor behavior.
  • Still in active beta with 36 open issues; MIT-licensed and free — try it at lexxy.dev/sandbox.

37signals, the company behind Basecamp and HEY, has open-sourced Lexxy , a rich text editor for Rails built on Meta's Lexical framework. It plugs into Action Text (Rails' built-in rich content system) and is designed to be a more capable alternative to Trix, the editor that ships with Rails by default. The project already has over 1,000 stars on GitHub and is actively used in production at Basecamp itself.

Why they built it

37signals created Lexxy because Trix was falling short of expectations in certain areas, and they encountered technical barriers when attempting to offer the experience they wanted. Trix is a relatively simple editor , it works well for basic prose, but it lacks things like real code blocks, table support, and a proper plugin system. Rather than fork Trix, the team chose to build on top of a battle-tested foundation.

Lexical is a fast, robust, flexible framework for building text editors, developed by Meta and used in WhatsApp and Facebook apps. By sitting on top of Lexical, Lexxy inherits a production-hardened editing core and gains access to its extensibility model , meaning the 37signals team (and the community) can build custom behaviors without fighting the editor's internals.

What it actually does

Lexxy powers Basecamp and hundreds of other products, with clean HTML, Markdown shortcuts, code highlighting, attachments, and more, all wired straight into Action Text. Here's the full feature set:

  • Clean HTML output: Good HTML semantics , paragraphs are real <p> tags, as they should be.
  • Markdown shortcuts: Shortcuts and auto-formatting on paste.
  • Real-time syntax highlighting: Code blocks get live syntax highlighting as you type.
  • Smart links: Create links by pasting URLs on selected text.
  • Mentions and prompts: Configurable prompts with support for mentions and other interactive prompts with multiple loading and filtering strategies.
  • Attachment previews: Preview attachments like PDFs and videos in the editor.
  • Tables and image galleries with drag-and-drop support.
  • Extensions API for writing custom editor behavior.

The Action Text angle

Lexxy works seamlessly with Action Text, generating the same canonical HTML format it expects for attachments. That means your existing has_rich_text models, Active Storage attachments, and backend rendering all continue to work without changes. Lexxy just replaces the frontend editing surface.

Lexxy will also bring a meaningful improvement to Action Text: it will let you configure the editor in Action Text just like you configure the database in Active Record , opening the door to integrating other editors in Rails. On Rails 8.2+, this is already wired up: the gem sets config.action_text.editor = :lexxy automatically, and form.rich_text_area renders Lexxy instead of Trix with zero extra configuration.

How to install it

Installation is a standard gem + JS package combo. For import maps (the Rails default):

# Gemfile
gem 'lexxy', '~> 0.9.21'
# importmap.rb
pin "lexxy", to: "lexxy.js"
pin "@rails/activestorage", to: "activestorage.esm.js"
# app/javascript/application.js
import "lexxy"

If you're using a JS bundler like esbuild or webpack, the NPM package is @37signals/lexxy. For projects that want to migrate incrementally, you can keep Trix in some places and use Lexxy in others by calling form.lexxy_rich_text_area explicitly and setting config.lexxy.override_action_text_defaults = false.

What to watch out for

Lexxy is already in use at Basecamp, but it is not yet fully mature , expect rapid improvements as more users adopt it. The repo currently has 36 open issues, and the team is actively welcoming bug reports and pull requests. It is MIT-licensed and free to use.

For Rails shops that have been stuck with Trix's limitations, Lexxy is a serious option worth evaluating. The live sandbox lets you try the editor directly in the browser before committing to anything, and the official docs cover installation, configuration, prompts, extensions, and the event system in detail.