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.
Ref. https://github.com/obsidianmd/obsidian-api/blob/d4b79f95ccf3838a305915a137a844250766d023/obsidian.d.ts#L535-L546
Ref.
|
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); |
When I look at the
Commandof theobsidian-api, I notice that there areeditorCallback()andeditorCheckCallback().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.
Ref. https://github.com/obsidianmd/obsidian-api/blob/d4b79f95ccf3838a305915a137a844250766d023/obsidian.d.ts#L535-L546
Ref.
obsidian-command-alias-plugin/src/main.ts
Lines 89 to 113 in ae6270d