CommunityNews

CommunityNews

Slate – A completely customizable framework for building rich text editors

Why?

Why create Slate? Well… (Beware: this section has a few of my opinions!)

Before creating Slate, I tried a lot of the other rich text libraries out there—Draft.js, Prosemirror, Quill, etc. What I found was that while getting simple examples to work was easy enough, once you started trying to build something like Medium, Dropbox Paper or Google Docs, you ran into deeper issues…

  • The editor’s “schema” was hardcoded and hard to customize. Things like bold and italic were supported out of the box, but what about comments, or embeds, or even more domain-specific needs?
  • Transforming the documents programmatically was very convoluted. Writing as a user may have worked, but making programmatic changes, which is critical for building advanced behaviors, was needlessly complex.
  • Serializing to HTML, Markdown, etc. seemed like an afterthought. Simple things like transforming a document to HTML or Markdown involved writing lots of boilerplate code, for what seemed like very common use cases.
  • Re-inventing the view layer seemed inefficient and limiting. Most editors rolled their own views, instead of using existing technologies like React, so you have to learn a whole new system with new “gotchas”.
  • Collaborative editing wasn’t designed for in advance. Often the editor’s internal representation of data made it impossible to use to for a realtime, collaborative editing use case without basically rewriting the editor.
  • The repositories were monolithic, not small and reusable. The code bases for many of the editors often didn’t expose the internal tooling that could have been re-used by developers, leading to having to reinvent the wheel.
  • Building complex, nested documents was impossible. Many editors were designed around simplistic “flat” documents, making things like tables, embeds and captions difficult to reason about and sometimes impossible.

Of course not every editor exhibits all of these issues, but if you’ve tried using another editor you might have run into similar problems. To get around the limitations of their API’s and achieve the user experience you’re after, you have to resort to very hacky things. And some experiences are just plain impossible to achieve.

If that sounds familiar, you might like Slate.

Which brings me to how Slate solves all of that…

Read in full here:

This thread was posted by one of our members via one of our news source trackers.

Where Next?

Popular General Dev topics Top

New
New
New
First poster: bot
Welcome to the second part of this series aimed to make you a better Vim user! If you have no idea about Vim, you should begin with the f...
New
First poster: bot
At least one Vim trick you might not know • Hillel Wayne. I’ve been using Vim for eight years and am still discovering new things. This...
New
First poster: OvermindDL1
It’s Magit! A Git interface inside Emacs Magit is a text-based Git user interface that puts an unmatched focus on streamlining workflows....
New
nirg
So, I actually got my Onivim License Key a while back. Am a Vim user for about 4 years. For me it was never ready enough for getting ac...
New
Maartz
Is Onivim a good candidate for Elixir development ? For the moment I use, based on my mood – I guess, a combination of VSCode and LunarV...
New
First poster: malloryerik
A modern open source code editor in Rust Native GUI and Rust powered performance, we as developers know what you need for an essential to...
New
malloryerik
I’m trying it out tonight. Any tips or experiences? I’ve actually had quite a bit of success with chatting with GPT-4, at least until it...
New

Other popular topics Top

AstonJ
SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New
New
Margaret
Hello content creators! Happy new year. What tech topics do you think will be the focus of 2021? My vote for one topic is ethics in tech...
New
AstonJ
Seems like a lot of people caught it - just wondered whether any of you did? As far as I know I didn’t, but it wouldn’t surprise me if I...
New
gagan7995
API 4 Path: /user/following/ Method: GET Description: Returns the list of all names of people whom the user follows Response [ { ...
New
AstonJ
Biggest jackpot ever apparently! :upside_down_face: I don’t (usually) gamble/play the lottery, but working on a program to predict the...
New
PragmaticBookshelf
Author Spotlight Rebecca Skinner @RebeccaSkinner Welcome to our latest author spotlight, where we sit down with Rebecca Skinner, auth...
New
DevotionGeo
I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New
sir.laksmana_wenk
I’m able to do the “artistic” part of game-development; character designing/modeling, music, environment modeling, etc. However, I don’t...
New
AnfaengerAlex
Hello, I’m a beginner in Android development and I’m facing an issue with my project setup. In my build.gradle.kts file, I have the foll...
New