Concepts
Interfaces
Slate works with pure JSON objects. All it requires is that those JSON objects conform to certain interfaces.
Nodes
The most important types are the Node objects A root-level Editor node that contains the entire document's content. Container Element nodes that have semantic meaning in your domain.
Locations
Locations are how you refer to specific places in the document when inserting, deleting, or doing anything else with a Slate editor. There are a few different kinds of location interfaces, each for different use cases.
Transforms
Slate's data structure is immutable, so you can't modify or delete nodes directly. Instead, Slate comes with a collection of "transform" functions that let you change your editor's value.
Operations
Operations are the granular, low-level actions that occur while invoking transforms. A single transform could result in many low-level operations being applied to the editor.
Commands
While editing richtext content, your users will be doing things like inserting text, deleting text, splitting paragraphs, adding formatting, etc. Under the cover these edits are expressed using transforms and operations.
Editor
All of the behaviors, content and state of a Slate editor is rolled up into a single, top-level Editor object. It has an interface of It is slightly more complex than the others, because it contains all of the top-level functions that define your custom, domain-specific behaviors.
Plugins
You've already seen how the behaviors of Slate editors can be overridden. These overrides can also be packaged up into "plugins" to be reused, tested and shared.
Rendering
One of the best parts of Slate is that it's built with React, so it fits right into your existing application. It doesn't re-invent its own view layer that you have to learn.
Serializing
Slate's data model has been built with serialization in mind. Specifically, its text nodes are defined in a way that makes them easier to read at a glance, but also easy to serialize to common formats like HTML and Markdown.
Normalizing
Slate editors can edit complex, nested data structures. And for the most part this is great.
Using TypeScript
Slate supports typing of one Slate document model (ie. one set of custom Editor , Element and Text types).