1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-07-31 20:40:19 +02:00

placeholder fixes

This commit is contained in:
Ian Storm Taylor
2016-07-11 19:06:08 -07:00
parent 4b30cded6a
commit 1dd2ff6243
2 changed files with 7 additions and 2 deletions

View File

@@ -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...

View File

@@ -23,7 +23,6 @@ class Placeholder extends React.Component {
};
static defaultProps = {
onlyFirstChild: false,
style: {
opacity: '0.333'
}