diff --git a/src/components/Editor/CustomExtensions/SlashCommands/ExtensionConfig.js b/src/components/Editor/CustomExtensions/SlashCommands/ExtensionConfig.js index 8644b970..a3ed69e8 100644 --- a/src/components/Editor/CustomExtensions/SlashCommands/ExtensionConfig.js +++ b/src/components/Editor/CustomExtensions/SlashCommands/ExtensionConfig.js @@ -35,9 +35,7 @@ export default { addOptions() { return { - HTMLAttributes: { - class: "commands", - }, + HTMLAttributes: { class: "commands" }, suggestion: { char: "/", startOfLine: false, @@ -91,7 +89,13 @@ export default { highlightFocussedNode(); }, onUpdate(props) { - reactRenderer.updateProps(props); + if ( + props.editor.isActive("image") || + props.editor.isActive("codeBlock") + ) { + return; + } + reactRenderer?.updateProps(props); popup[0].setProps({ getReferenceClientRect: props.clientRect,