generated from obsidianmd/obsidian-sample-plugin
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested
Description
When I look at the Command of the obsidian-api, I notice that there are editorCallback() and editorCheckCallback().
However, this plugin doesn't seem to be tied to that part.
I haven't investigated it yet. If there is a problem, please add an issue in Bug Report format. At that time, I will be grateful.
obsidian-command-alias-plugin/src/main.ts
Lines 89 to 113 in ae6270d
| if (target.callback) { | |
| command.callback = () => { | |
| const target = app.commands.commands[alias.commandId]; | |
| if (target) { | |
| target.callback(); | |
| } else { | |
| new Notice("Missing command. The command may be invalid."); | |
| } | |
| }; | |
| } | |
| if (target.checkCallback) { | |
| command.checkCallback = (checking) => { | |
| const target = app.commands.commands[alias.commandId]; | |
| if (target) { | |
| return target.checkCallback(checking); | |
| } | |
| if (checking) { | |
| // Don't hide the probrem. | |
| return true; | |
| } else { | |
| new Notice("Missing command. The command may be invalid."); | |
| } | |
| } | |
| } | |
| this.addCommand(command); |
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested