Top 5 Rich Text Editors for React in 2021

Evaluating different Rich Text Editor for React with feature comparisons

Yasas Sri Wickramasinghe
Bits and Pieces

--

Today, Rich Text Editors are used in many applications, including simple blogs to complex content management systems. However, choosing one isn’t easy since there are many out there with different capabilities.

So, in this article, I will evaluate 5 Rich Text Editor for React with feature comparisons to help you choose the best one for your requirement.

1. Draft.js — Most Popular Free Editor for Basic Needs

Preview of Draft.js

Draft.js is an open-source project by Facebook, built for React. This is a robust, extensible, and customizable framework, and it's very popular among React developers.

According to Facebook, this library is used in Facebook statuses, comments and messenger.com.

Pros

  • Highly extensible and customizable with plugins built on top of Draft.js.
  • Flat content model is simple to understand.
  • Many tutorials and support available due to the large, growing open-source developer community backed by Facebook since 2016.

Cons

  • When there is a need for complex content structures like tables, the editor becomes slow, and the code gets complex.
  • OSX custom key-binding issues.
  • No official mobile support.

Draft.js has more than 20K GitHub stars and around 620,000 weekly NPM downloads.

If you are a beginner and looking to implement a text editor for basic needs, I recommend Draft.js for you, and you can easily install it using npm or yarn:

npm install draft-js 
yarn add draft-js

2. Slate.js — Free Editor with Complex Content Support

Preview of Slate.js

Slate.js is another exciting Rich Text Editor for React inspired by Draft.js. And you can use it to build beautiful editors like Medium Editor, Dropbox Paper, or Google Docs.

Although Slate.js is still in beta, it has more than 20K GitHub stars.

Pros

  • Produces JSON output making it easier to integrate with other modules.
  • Its’ nested document model supports much more complex content structures like Tables, Page Breaks, and other custom features.
  • Extensible with the use of plugins.
  • Well descriptive documentation and interactive demos available.
  • Trusted by Salesforce and Airtable.

Cons

  • Still in Beta(as of May 2021), which might be a bummer to trust and implement on production sites.
  • Need a bit more initial UI setup to accommodate editor controls.

However, If you are looking to implement a memory-optimized Rich Text Editor with custom features, Slate.js is one of the best picks for you, and it can be installed easily using yarn or npm.

yarn add slate slate-react
npm install slate slate-react

3. Quill.js — Free API Driven Editor with Themes

Preview of Quill.js

Third on the list is Quill.js, Rich Text Editor with cross-platform and cross-browser support. Hence, this is the perfect choice for you to look for smooth functionality on all modern browsers in desktops, tablets, and mobile phones.

Quill.js 29.9K GitHub Stars and more than 570,000 weekly downloads in NPM.

Pros

  • No need of parsing HTML or different DOM trees like in other text editors, thanks to its API-driven design.
  • Custom content and formatting support with presets for editor styling.
  • Cross-platform and browser support.
  • Easy to set up.

Cons

  • Possible XSS security vulnerabilities.
  • Feature customization is limited.
  • Fewer updates and patches.

You can install Quill.js using NPM or use the CDN version:

npm install quill@1.3.6<!-- or use the bellow CDN --><!-- Main Quill library --> 
<script src="//cdn.quilljs.com/1.3.6/quill.js"></script>
<script src="//cdn.quilljs.com/1.3.6/quill.min.js"></script>
<!-- Theme included stylesheets -->
<link href="//cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
<link href="//cdn.quilljs.com/1.3.6/quill.bubble.css" rel="stylesheet">
<!-- Core build with no theme, formatting, non-essential modules --> <link href="//cdn.quilljs.com/1.3.6/quill.core.css" rel="stylesheet">
<script src="//cdn.quilljs.com/1.3.6/quill.core.js"></script>

4. TinyMCE — Commercial Feature Rich Text Editor

Preview of TinyMCE

This editor is a commercial library that comes with tons of bells and whistles. If you have some extra bucks and looking to have a headache-free powerful text editor, TinyMCE is a great choice.

Pros

  • Real-time collaboration support.
  • Mentions and comments support.
  • Advanced tables and complex content support.
  • Enhanced media embed support.
  • Automated link checker.

Cons

  • Need to purchase a subscription to use premium features.

TinyMCE provides you pricing plans as Core (free plan with limited features), Essential (25 USD per month), Professional(75 USD per month), and Flexible(custom pricing).

You can always try the free version or trials before making your decision. And TinyMCE provides good documentation, including all the details about its features and installation.

5. KendoReact — Commercial Production Ready Editor

Preview of Kendo React Editor

Kendo is probably the most famous commercial UI component library available in the market.

It is a highly stable and production-ready library that comes with undoubtedly the best customer support service.

Pros

  • Lightning performance.
  • Highly customizable.
  • Ready to use for production applications.
  • Globalization support.
  • Customer support.

Cons

  • Extremely expensive.

In comparison to free editors, Kendo has some fantastic features. If you have highly competitive business needs for text editors and looking for a hassle-free future proof solution, this one is for you.

Kendo comes with 3 different plans as KendoReact. KendoUI and DevCraft starting from 899$ to 1499$ per developer perpetual license.

There are some limitations in the first 2 packages compared to DevCraft, and you can find the full comparison from their website.

Bonus: TipTap — Free Modern Looking Text Editor

Preview of TipTap

This is my personal favorite. Even though this editor is in beta, there are many exciting features.

TipTap is a headless editor, which allows you to fully customize it. This editor supports real-time collaborations as well.

Pros

  • UI customizability.
  • Keyboard shortcuts.
  • Mobile support.
  • Collaborative editing.

Cons

  • Still in beta version(yet stable and backed by a fast-growing developer community).

Despite being fairly new, TipTap has more than 10K GitHub stars and 93,000+ weekly NPM downloads.

If you are looking for a free, feature-rich modern-looking text editor from React? In that case, I highly recommend TipTap for you to try out:

# install with npm 
npm install @tiptap/core @tiptap/starter-kit
# install with Yarn
yarn add @tiptap/core @tiptap/starter-kit

Build better Component Libs and Design Systems

Share components across teams and projects to speed up development and make sure your users experience a consistent design at every touchpoint.

OSS Tools like Bit offer a great dev experience for building, sharing, and adopting components across teams and applications. Create a component hub for free give it a try →

An independently source-controlled and shared “card” component. On the right => its dependency graph, auto-generated by Bit.

Conclusion

The above Rich Text Editors are only a subset of many available for React. However, I presented 6 different editors with their pros and cons to pick the ideal one for your need.

I hope my suggestions will help you choose the best Rich Text Editor for your project. And don’t forget to share your thoughts after working with these libraries.

Thank you for reading!

Build Apps with reusable components, just like Lego

Bit’s open-source tool help 250,000+ devs to build apps with components.

Turn any UI, feature, or page into a reusable component — and share it across your applications. It’s easier to collaborate and build faster.

Learn more

Split apps into components to make app development easier, and enjoy the best experience for the workflows you want:

Micro-Frontends

Design System

Code-Sharing and reuse

Monorepo

--

--