Allow using / anywhere on a line or table (#7026)

This commit is contained in:
Tom Moor
2024-06-12 08:50:54 -04:00
committed by GitHub
parent df3cd22aee
commit 8a4555f565
5 changed files with 4 additions and 8 deletions

View File

@@ -2,7 +2,6 @@ import { action, observable } from "mobx";
import { InputRule } from "prosemirror-inputrules";
import { NodeType, Schema } from "prosemirror-model";
import { EditorState, Plugin } from "prosemirror-state";
import { isInTable } from "prosemirror-tables";
import Extension from "@shared/editor/lib/Extension";
import { SuggestionsMenuPlugin } from "@shared/editor/plugins/Suggestions";
import { isInCode } from "@shared/editor/queries/isInCode";
@@ -50,8 +49,7 @@ export default class Suggestion extends Extension {
match &&
(parent.type.name === "paragraph" ||
parent.type.name === "heading") &&
(!isInCode(state) || this.options.enabledInCode) &&
(!isInTable(state) || this.options.enabledInTable)
(!isInCode(state) || this.options.enabledInCode)
) {
this.state.open = true;
this.state.query = match[1];