Skip to content

Commit

Permalink
refactor: clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Dec 1, 2023
1 parent f398f38 commit f7f9005
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions editor/src/components/editor/intelli/ai-block-extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
* origin: https://github.com/ueberdosis/tiptap/blob/develop/packages/extension-code-block/src/code-block.ts
*/
import {
CommandProps,
Node,
RawCommands,
ReactNodeViewRenderer,
} from "@tiptap/react";
import { PluginKey } from "@tiptap/pm/state";

import AiBlockView from "./ai-block-view";

Expand All @@ -20,11 +18,9 @@ declare module "@tiptap/core" {
setAiBlock: {
setAiBlock: (attributes: Record<string, any>) => ReturnType;
};

toggleAiBlock: {
toggleAiBlock: (attributes: Record<string, any>) => ReturnType;
};

enableEnter: {
enableEnter: () => ReturnType;
};
Expand Down Expand Up @@ -62,7 +58,7 @@ export const createAiBlock = () => {
},
};
},
addNodeView() {
addNodeView: function () {
return ReactNodeViewRenderer(AiBlockView);
},
addKeyboardShortcuts() {
Expand Down

0 comments on commit f7f9005

Please sign in to comment.