Skip to content

Commit

Permalink
Fixed errors raised by onUpdate of slash-commands inside codeBlocks (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
gaagul authored Sep 28, 2023
1 parent 428a008 commit a6adb53
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ export default {

addOptions() {
return {
HTMLAttributes: {
class: "commands",
},
HTMLAttributes: { class: "commands" },
suggestion: {
char: "/",
startOfLine: false,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit a6adb53

Please sign in to comment.