diff --git a/packages/tiptap-extensions/src/plugins/Suggestions.js b/packages/tiptap-extensions/src/plugins/Suggestions.js index 63b40ba36..8cebbcbf2 100644 --- a/packages/tiptap-extensions/src/plugins/Suggestions.js +++ b/packages/tiptap-extensions/src/plugins/Suggestions.js @@ -10,6 +10,11 @@ function triggerCharacter({ }) { return $position => { + // cancel if top level node + if ($position.depth <= 0) { + return false + } + // Matching expressions used for later const escapedChar = `\\${char}` const suffix = new RegExp(`\\s${escapedChar}$`)