mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-07-31 20:40:19 +02:00
placeholder fixes
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
|
||||
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. Here's what they all do:
|
||||
|
||||
- [Content](#content)
|
||||
- [Editor](#editor)
|
||||
- [Leaf](#leaf)
|
||||
- [Placeholder](#placeholder)
|
||||
- [Text](#text)
|
||||
- [Void](#void)
|
||||
|
||||
@@ -31,6 +32,11 @@ The `Leaf` component is the lowest-level component in the React tree. Its goal i
|
||||
One `Leaf` component is rendered for each range of text with a unique set of [`Marks`](../models#mark). It handles both applying the mark styles to the text, and translating the current [`Selection`](../models#selection) into a real DOM selection, since it knows about the string offsets.
|
||||
|
||||
|
||||
#### Placeholder
|
||||
|
||||
A `Placeholder` component is just a convenience for rendering placeholders on top of empty nodes. It's used in the core plugin's default block renderer, but is also exposed to provide the convenient API for custom blocks as well.
|
||||
|
||||
|
||||
#### Text
|
||||
|
||||
A `Text` component is rendered for each [`Text`](../models#text) 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#mark), and then delegates rendering each range to...
|
||||
|
@@ -23,7 +23,6 @@ class Placeholder extends React.Component {
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
onlyFirstChild: false,
|
||||
style: {
|
||||
opacity: '0.333'
|
||||
}
|
||||
|
Reference in New Issue
Block a user