mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-07-31 20:40:19 +02:00
update components readme
This commit is contained in:
@@ -1,12 +1,11 @@
|
|||||||
|
|
||||||
This directory contains the React components that Slate renders. The only one that is publicly accessible is the `Editor`, which composes the others. But here's what they all do:
|
This directory contains the React components that Slate renders. The only one that is publicly accessible is the `Editor`, which composes the others. But here's what they all do:
|
||||||
|
|
||||||
|
- [Content](#content)
|
||||||
#### Editor
|
- [Editor](#editor)
|
||||||
|
- [Leaf](#leaf)
|
||||||
The `Editor` is the highest-level component that you render from inside your application. Its goal is to present a very clean API for the user, and to encapsulate all of the plugin-level logic.
|
- [Text](#text)
|
||||||
|
- [Void](#void)
|
||||||
Many of the properties passed into the editor are combined to create a plugin of its own, that is given the highest priority. This makes overriding core logic super simple, without having to write a separate plugin.
|
|
||||||
|
|
||||||
|
|
||||||
#### Content
|
#### Content
|
||||||
@@ -18,6 +17,13 @@ Many of the properties passed into the editor are combined to create a plugin of
|
|||||||
You'll notice there are **no** `Block` or `Inline` components. That's because those rendering components are provided by the user, and rendered directly by the `Content` component. You can find the default renderers in the [`Core`](../plugins/core.js) plugin's logic.
|
You'll notice there are **no** `Block` or `Inline` components. That's because those rendering components are provided by the user, and rendered directly by the `Content` component. You can find the default renderers in the [`Core`](../plugins/core.js) plugin's logic.
|
||||||
|
|
||||||
|
|
||||||
|
#### Editor
|
||||||
|
|
||||||
|
The `Editor` is the highest-level component that you render from inside your application. Its goal is to present a very clean API for the user, and to encapsulate all of the plugin-level logic.
|
||||||
|
|
||||||
|
Many of the properties passed into the editor are combined to create a plugin of its own, that is given the highest priority. This makes overriding core logic super simple, without having to write a separate plugin.
|
||||||
|
|
||||||
|
|
||||||
#### Text
|
#### Text
|
||||||
|
|
||||||
A `Text` component is rendered for each [`Text`](../models) model in the document tree. This component handles grouping the characters of the text node into ranges that have the same set of [`Marks`](../models), and then delegates rendering each range to...
|
A `Text` component is rendered for each [`Text`](../models) model in the document tree. This component handles grouping the characters of the text node into ranges that have the same set of [`Marks`](../models), and then delegates rendering each range to...
|
||||||
|
Reference in New Issue
Block a user