Draft.js VS CodeMirror

Compare Draft.js vs CodeMirror and see what are their differences.


A React framework for building text editors. (by facebookarchive)


In-browser code editor (version 5, legacy) (by codemirror)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
Draft.js CodeMirror
40 39
22,309 26,559
- 0.3%
8.2 6.1
over 1 year ago 14 days ago
JavaScript JavaScript
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.


Posts with mentions or reviews of Draft.js. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-12-17.


Posts with mentions or reviews of CodeMirror. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-11-04.
  • I've cloned a simple VScode using Tauri and ReactJS
    3 projects | dev.to | 4 Nov 2022
    codemirror - a code editor component for the web
  • massCode v3 - An open source snippets manager is out πŸš€
    5 projects | dev.to | 5 Sep 2022
    massCode uses Codemirror as the basis for the editor and .tmLanguage as the grammar for syntax highlighting. This tandem opens the door to over 600 existing grammars. The application currently supports more than 160 grammars. In addition to .tmLanguage, the application supports .tmTheme for themes. There is also…
  • pyTermTk sandbox with Pyodide + xterm.js + CodeMirror5 + other stuff
    6 projects | /r/Python | 25 Aug 2022
    After giving up countless times since I started this project, I finally managed to dig the dark secrets of Pyodide and run pyTermTk on a browser, all of this, of course, thanks to the magic of xterm.js. I know, my friend, I know what you are thinking, I was disgusted at first picturing that hideous javascript defiling the python purity of my code, but, when I saw my red pepper shining on webkit engine, well, I couldn't hold back a tear. And after that, who am I to not include also an editor and my collection of demos and examples? So, here it is, a super minimal buggy and feature incomplete pyTermTk Sandbox
  • [Media] This is my first Rust project, a little pastebin web app called MicroBin. πŸ¦€ It's blazingly fast πŸš€πŸ”₯ and crazy safe of course
    3 projects | /r/rust | 8 May 2022
    syntax highlighting is simple with https://codemirror.net/
  • How to add SQL editor to your django admin.
    2 projects | dev.to | 1 May 2022
    Official website of Codemirror.
  • Do you trust the Obsidian company?
    8 projects | /r/ObsidianMD | 21 Apr 2022
    CodeMirror [MIT] https://codemirror.net/
  • Tilepieces
    3 projects | /r/u_tilepieces | 8 Apr 2022
    The project is built with itself, and uses some of the popular frontend libraries like codemirror and terser.To build a tilepieces application, read the instructions.
  • introducing tilepieces: An open source project to visually editing HTML documents and Web applications
    4 projects | dev.to | 6 Apr 2022
    Tilepieces is a software that allows you to create applications for editing HTML documents, using some of the popular interfaces of the browser developer tools (with which it is possible to integrate css edits). Tilepieces also allows you to reuse your favorite code and libraries, and exposes APIs that are useful for editing multiple files at a time. You can start using tilepieces with its progressive web application version! Why Tilepieces? Tilepieces has everything you need to manage and design the layout of all your web projects, be they newsletters, banners, websites or web applications. Any library and framework can be reused using its component data structure, similar to NPM's package.json. These data structures can be populated by the application itself. Its API and the possibility of customization make it perfect as the basis of a CMS How Tilepieces works The project is built with itself, and uses some of the popular frontend libraries like codemirror and terser. To build a tilepieces application, read the instructions. How to use Tilepieces You can start use tilepieces immediately with its progressive web application version. If you like Node.js, there is an npm package for you that will launch the application in your favourite browser.
  • [AskJS] Front-end codebases made using vanilla JavaScript for studying
    7 projects | /r/javascript | 28 Mar 2022
    I think that Codemirror 5 is a nice example, version 6 is somewhat hard to follow, there are way too many modules and it's hard to understand.
  • What is the point of this php.js file ?
    2 projects | /r/learnprogramming | 16 Mar 2022

What are some alternatives?

When comparing Draft.js and CodeMirror you can also consider the following projects:

quill - Quill is a modern WYSIWYG editor built for compatibility and extensibility.

Monaco Editor - A browser based code editor

ace - Ace (Ajax.org Cloud9 Editor)

slate - A completely customizable framework for building rich text editors. (Currently in beta.)

TinyMCE - The world's #1 JavaScript library for rich text editing. Available for React, Vue and Angular

react-quill - A Quill component for React.

ProseMirror - The ProseMirror WYSIWYM editor

Editor.js - A block-style editor with clean JSON output

react-draft-wysiwyg - A Wysiwyg editor build on top of ReactJS and DraftJS. https://jpuri.github.io/react-draft-wysiwyg

lexical - Lexical is an extensible text editor framework that provides excellent reliability, accessibility and performance.