Skip to content

Commit

Permalink
Merge pull request #6413 from nextcloud/fix/enhance_placeholder
Browse files Browse the repository at this point in the history
fix(placeholder): Show placeholder on empty paragraph, improve wording
  • Loading branch information
juliusknorr authored Sep 17, 2024
2 parents 4b6a89c + d332a2b commit 85fc0b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/css/prosemirror.scss
Original file line number Diff line number Diff line change
Expand Up @@ -382,12 +382,12 @@ div.ProseMirror {
display: block;
}

.editor__content p.is-empty:first-child::before {
.editor__content p.is-empty::before {
color: var(--color-text-maxcontrast);
content: attr(data-placeholder);
float: left;
color: var(--color-text-maxcontrast);
pointer-events: none;
height: 0;
pointer-events: none;
}

.editor__content {
Expand Down
4 changes: 1 addition & 3 deletions src/extensions/RichText.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ export default Extension.create({
LinkBubble,
this.options.editing
? Placeholder.configure({
emptyNodeClass: 'is-empty',
placeholder: t('text', 'Add notes, lists or links …'),
showOnlyWhenEditable: true,
placeholder: t('text', 'Start writing, or try \'/\' to add, \'@\' to mention…'),
})
: null,
TrailingNode,
Expand Down

0 comments on commit 85fc0b0

Please sign in to comment.