How to Build a Rich Text Editor in React with SlateJS

How to Build a Rich Text Editor in React with SlateJS

Building an awesome editor for your React-based web application is by no means easy. But with SlateJS things get much easier. Even with the help of Slate, building a full-featured editor is way more work than we can cover in one blog post, so this post will give you the big picture and subsequent posts will dive into the dirty details.

Building an awesome editor for your React-based web application is by no means easy. But with  SlateJS things get much easier. Even with the help of Slate, building a full-featured editor is way more work than we can cover in one blog post, so this post will give you the big picture and subsequent posts will dive into the dirty details.

Note: this post is based on a recent talk at the JavaScript NYC meetup. You can watch the video here:  https://www.youtube.com/watch?v=wLjx67aNEMI

SlateJS

We’re building  Kitemaker, a new, fast, and highly collaborative alternative to issue trackers like Jira, Trello, and Clubhouse. We’re big believers in remote work, and in particular working asynchronously so that team members get large, uninterrupted blocks of time to get work done. A key to supporting this type of work is having a really great editor so that teams are inspired to collaborate together on issues and ensure alignment. And we think we’ve got the best editor around:

Markdown shortcuts, code blocks with syntax highlighting, images, embedding designs from  Figma, math expressions with LaTex, diagrams with  MermaidJS, and, of course, emojis ♥️. All done entirely with Slate.

So why did we choose to go with Slate in the first place? It’s definitely not the only editor framework out there. For us, the things that pushed us towards Slate were:

  • It’s un-opinionated about how your document is structured, and that gave us the flexibility we needed
  • It doesn’t force any built-in toolbars or any other visuals upon you
  • It’s built with React in mind and that makes a huge difference when rendering complex documents
  • It lays the foundation for collaborative editing which is something we believe is important for Kitemaker
  • We really like  the philosophy behind it
  • It has a thriving community, particularly on  Slack

react slatejs javascript

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

How native is React Native? | React Native vs Native App Development

Article covers: How native is react native?, React Native vs (Ionic, Cordova), Similarities and difference between React Native and Native App Development.

Increase Performance of React Applications Via Array JavaScript Methods

Increase Performance of React Applications Via Array JavaScript Methods. We will create a simple event management application in the react to add, update, and delete an event.

Top VSCode Extensions for React, React Native, JavaScript and Productivity

Bunch of VSCode Extensions that improve quality of your coding time no matter what stack you are using. In this post, you'll see Top VSCode Extensions for React, React Native, JavaScript and Productivity

Routing in React without React-Router

I have been using React JS in my projects for quite some time now and am used to managing routing in my app using the react-router package. I have always been keen on having as little dependencies in my apps as possible, so, I always felt perturbed by the use of this particular package in simpler apps which did not have complex routes.

React Hello World: Your First React App

The best way to learn React is to re-create Hello World but for React. Let's learn all there is to know about building a simple Hello World app in React! This tutorial will thoroughly explain everything there is to know about creating a new React app in the quickest way possible. If you’re someone who wants to learn how to spin up a brand new React app, then this tutorial is for you.