Skip to content

Commit f0c30b8

Browse files
authored
Merge pull request #8078 from nextcloud/backport/8075/stable32
[stable32] fix(editor): bring back placeholder
2 parents b6e0f32 + ef44868 commit f0c30b8

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/extensions/RichText.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
55

6+
import { t } from '@nextcloud/l10n'
67
import { Extension } from '@tiptap/core'
78
import { common, createLowlight } from 'lowlight'
89

@@ -15,6 +16,7 @@ import Dropcursor from '@tiptap/extension-dropcursor'
1516
import Gapcursor from '@tiptap/extension-gapcursor'
1617
import HorizontalRule from '@tiptap/extension-horizontal-rule'
1718
import ListItem from '@tiptap/extension-list-item'
19+
import Placeholder from '@tiptap/extension-placeholder'
1820
import Text from '@tiptap/extension-text'
1921
import MentionSuggestion from '../components/Suggestion/Mention/suggestions.js'
2022
import Heading from '../nodes/Heading.js'
@@ -122,6 +124,11 @@ export default Extension.create({
122124
relativePath: this.options.relativePath,
123125
}),
124126
LinkBubble,
127+
this.options.editing
128+
? Placeholder.configure({
129+
placeholder: t('text', "Start writing or type '/' to add…"),
130+
})
131+
: null,
125132
TrailingNode,
126133
TextDirection.configure({
127134
types: [

0 commit comments

Comments
 (0)