Skip to content

Did this miss the editorCallback() and editorCheckCallback() ? #29

@yajamon

Description

@yajamon

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomershelp wantedExtra attention is neededquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions