fix: allow prompts starting with / (#6704)
fix: allow prompts starting with /
This commit is contained in:
parent
1c874e475e
commit
c7abc56b0c
1 changed files with 3 additions and 0 deletions
|
|
@ -15,6 +15,9 @@ export const SlashCommand = Node.create<SlashCommandOptions>({
|
|||
addOptions() {
|
||||
return {
|
||||
suggestion: {
|
||||
allow: ({ editor }) =>
|
||||
// the first character is "/". we want to avoid slash commands when there is a space after it
|
||||
editor.getText().at(1) !== " ",
|
||||
char: "/",
|
||||
pluginKey: new PluginKey(this.name),
|
||||
startOfLine: true,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue