Skip to content

Commit

Permalink
fix: add default placeholder text
Browse files Browse the repository at this point in the history
  • Loading branch information
malezjaa committed Jan 26, 2024
1 parent cd98ad3 commit b527cce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/extensions/placeholder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ export const Placeholder = Extension.create<PlaceholderOptions>({

let nodeName = node.type.name as keyof PlaceholderNodes;
let name =
this?.options?.nodes?.[nodeName] || this.options.text;
this?.options?.nodes?.[nodeName] ||
(this.options.text ?? "Type '/' for commands");

const decoration = Decoration.node(pos, pos + node.nodeSize, {
class: classes.join(" "),
Expand Down

0 comments on commit b527cce

Please sign in to comment.