A glossary explaining the terms commonly used in Slate:
An "anchor point" is a point where a range starts.
A "character" is the smallest element that makes up a text node in Slate.
A selection is "collapsed" when text is deselected. A collapse occurs when a range's start and end points are the same.
The "document" is the top-level "node" that contains all other nodes that make up the content of the Slate editor.
Focus is defined differently based on your context:
A "focus point" is where a range ends. Unlike a anchor point, a focus point can be expanded.
The editor value provides a reference to the current "focus block" as a convenience. For example, you access the words within the block a user is focused on like so:
const words = editor.value.focusBlock.text.split(' ');
A "keys" is a unique identifier assigned to a node in Slate and is used to reference a node uniquely. As as the document changes, new unique keys are issued to avoid collisions within the data model.
A "mark" represents formatting data that is attached to characters within text. Standard formatting such as bold, italic,
code, or custom formatting for your application can be implemented using marks.
An "offset" is a distance from the start of a text node, measured in "characters".
A "plugin" is a reusable object that implements one or more of Slate's plugin hooks to add specific behavior to your editor. A plugin helps you express your application while keeping it easy to maintain and reason about.
A "point" represents a specific location in a document, where a user's cursor could be placed. It is represented by the
key of the node in the document, and the
offset of characters into a node.
To "unwrap" is the opposite of to "wrap", removing a surrounding node from a selection.
A Slate "value" is the top-level object in Slate and is an object encapsulating the entire value of a Slate editor. Read the Data Model guide to learn more.
To "wrap" is to surround a piece of text or a node in another node. For example, if you select the text