mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-27 23:15:15 +08:00
Added CSS Required for Setup (#3711)
* Added CSS Setup Context It was previously not clear that additional CSS was required to display placeholders. * Fixed Typo.
This commit is contained in:
parent
970727fbbf
commit
523aa5ce44
@ -14,6 +14,31 @@ This extension provides placeholder support. Give your users an idea what they s
|
||||
npm install @tiptap/extension-placeholder
|
||||
```
|
||||
|
||||
### Additional Setup
|
||||
Placeholders are displayed with the help of CSS.
|
||||
|
||||
**Display a Placeholder only for the first line in an empty editor.**
|
||||
```
|
||||
.ProseMirror p.is-editor-empty:first-child::before {
|
||||
color: #adb5bd;
|
||||
content: attr(data-placeholder);
|
||||
float: left;
|
||||
height: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
```
|
||||
**Display Placeholders on every new line.**
|
||||
```
|
||||
.ProseMirror p.is-empty::before {
|
||||
color: #adb5bd;
|
||||
content: attr(data-placeholder);
|
||||
float: left;
|
||||
height: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Settings
|
||||
|
||||
### emptyEditorClass
|
||||
|
Loading…
Reference in New Issue
Block a user