Skip to content

Commit 3a37453

Browse files
authored
remove command (#999)
1 parent 76b2d95 commit 3a37453

1 file changed

Lines changed: 0 additions & 29 deletions

File tree

apps/obsidian/src/utils/registerCommands.ts

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -61,35 +61,6 @@ export const createModifyNodeModalSubmitHandler = (
6161
};
6262

6363
export const registerCommands = (plugin: DiscourseGraphPlugin) => {
64-
plugin.addCommand({
65-
id: "open-node-type-menu",
66-
name: "Open node type menu",
67-
editorCallback: (editor: Editor) => {
68-
const hasSelection = !!editor.getSelection();
69-
70-
if (hasSelection) {
71-
new NodeTypeModal(plugin, (nodeType: DiscourseNode) => {
72-
void createDiscourseNode({
73-
plugin,
74-
editor,
75-
nodeType,
76-
text: editor.getSelection().trim() || "",
77-
});
78-
}).open();
79-
} else {
80-
const currentFile =
81-
plugin.app.workspace.getActiveViewOfType(MarkdownView)?.file ||
82-
undefined;
83-
new ModifyNodeModal(plugin.app, {
84-
nodeTypes: plugin.settings.nodeTypes,
85-
plugin,
86-
currentFile,
87-
onSubmit: createModifyNodeModalSubmitHandler(plugin, editor),
88-
}).open();
89-
}
90-
},
91-
});
92-
9364
plugin.addCommand({
9465
id: "create-discourse-node",
9566
name: "Create discourse node",

0 commit comments

Comments
 (0)