Announcing Squire 2.0—Fastmail releases next generation of open-source rich text editor

We’re pleased to announce we’ve released the next version of Squire, Fastmail’s open-source text editor.


 

At Fastmail, we strongly believe in being good internet citizens. Part of this is through our support for open standards, which make the internet better for everyone now and in the future. We work with the IETF, Internet Engineering Task Force, to develop the next generation of protocols so everyone can benefit from faster, more efficient, and more reliable syncing.

By releasing the libraries we build internally as open source, we make it easier for other developers to build high-quality applications like Fastmail, setting the standard for easy-to-use, efficient, delightful applications. We’re always eager to tackle these challenges: it’s fun and technically interesting work.

What is Squire?

Squire is our rich text editor that powers the mail composer in Fastmail, providing support for formatting and WYSIWYG text editing in all modern browsers. We first released Squire 1.0 in 2014 because there wasn’t a mature, capable library available to do what we needed.

Now, there are a good number of rich text editors. However, most have the luxury of strongly limiting what the person can enter to ensure the data model doesn’t break. We can’t use those because we must be able to handle arbitrary HTML because it may be used to forward or quote emails from third parties and must be able to preserve their HTML without breaking the formatting. This is Squire’s advantage.

If you’re a developer and being able to handle arbitrary HTML content is a requirement for your application, you may want to look at Squire as an option. In addition to its use at Fastmail, it’s been used in production at ProtonMail, SnappyMail, StartMail, Tutanota, Zoho Mail, Superhuman, and Teamwork Desk, as well as other non-mail apps, including Google Earth.

What’s new in Squire 2.0?

We’re excited to share with fellow developers the updates we’ve made to Squire 2.0. In addition to bug fixes and improvements, Squire 2.0 has been ported to TypeScript. We’re delighted by the additional guarantees that TypeScript confers on our codebase, and we know that the type hints that will propagate into your code once you upgrade will benefit you, too!

Squire 2.0 also now requires the use of HTML sanitization in order to protect your users. Please be sure to check out our changelog before upgrading; this version introduces some breaking changes.

The new type safety in Squire 2.0 provides an even greater layer of testing and quality assurance to prevent Fastmail users from seeing unintended behavior in our text editor. Should you build your application with Squire, not only will you get those benefits, but you’ll also benefit from Squire’s type annotations propagating through your application. You’ll also be putting a fast, secure, powerful editor in front of your users!

You can find the source code for Squire in our GitHub repo, or install it from npm with the package name squire-rte.


Squire is just one of the many contributions we make to open source and open standards. You can learn more by reading our Contributing to Open Source Technology page.

Older post Three Exciting Updates to Your Fastmail Calendar 
Newer post Private Email for Municipalities
Smart scheduling for your Fastmail calendar

Productivity is highly personal. Start using Morgen Assist and Fastmail together in under 5 minutes and begin smart scheduling in your calendar.

New Family Plans and Pricing
09 Apr 2024 Company

Today we are introducing new plans and pricing for new Fastmail customers, offering prices in many global currencies and launching some great deals to get your whole family on Fastmail.

Why Gmail Users Are Switching to Fastmail

Looking for a way to upgrade your inbox? Fastmail’s productivity features help you simplify your workflow and save time.