Editor.js is a block-styled editor for rich media stories. It outputs clean data in JSON instead of heavy HTML-markup. And more important thing is that Editor.js is designed to be API extendable and pluggable.
So there are few key features:
- Clean data output
- API pluggable
- Open source
In other editors the workspace is provided by single
contenteditable element in where you can create different HTML markup. All of us saw permanent bugs with moving text fragments or scaling images, while page parts are jumping and twitches. Or highlighting big parts of text in case when you just want to make few words to be a heading or bold.
Editor.js workspace consists of separate Blocks: paragraphs, headings, images, lists, quotes, etc. Each of them is an independent
contenteditable element (or more complex structure) provided by Plugin and united by Editor's Core.
At the same time, most useful features as arrow-navigation, copy & paste, cross block selection and others works almost as in the familiar editors.
But more interest thing is, as mentioned above, that Editor.js returns clean data instead of HTML-markup. Take a look at the example.
If our entry consists of few paragraph and header, in popular Medium editor after saving we will have something like this:
Lets compare with the same data returned by Editor.js:
As you can see, there are only data we need: list of structural Blocks with their content description.
You can use this data to easy render in Web, native mobile/desctop application, pass to Audio Readers, create templates for Facebook Instant Articles, AMP, RSS, create chat-bots and many other.
Also, clean data can be useful for backend processing: sanitizing, validation, injecting an advertising or other stuff, extracting Headings, make covers for social networks from Image Blocks and other.
A key value of the Editor is the API. All main functional units of the editor — Blocks, Inline Formatting Tools, Block Tunes — are provided by external plugins that uses Editor's API.
We decide to extract all this Tools to separate scripts to make Editor's Core more abstract and make API more powerful. Any challenges and tasks you are facing can be implemented by you own plugins using the API.
At the same time, API is created to be easy-to-understand and simple-to-use.
Editor.js is more than just an editor. It is a big open-source community of developers and contributors. Anyone can suggest an improvement or bug fix. Anyone can create new cool API features and plugins.
We will support each developer of Editor.js plugins: best solutions will be collected to the awesome-lists and promoted to the community. Together we can create a big suite of different Blocks, Inline Tools, Block Tunes that can hit wide spectre of tasks.
Thanks for your interest. Hope you enjoy Editor.js.