<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[`Command`](Command) › [`editorCheckCallback`](Command/editorCheckCallback)
## Command.editorCheckCallback property
A command callback that is only triggered when the user is in an editor. Overrides `editorCallback`<!-- -->, `callback` and `checkCallback`
**Signature:**
```typescript
editorCheckCallback?: (checking: boolean, editor: Editor, ctx: MarkdownView | MarkdownFileInfo) => boolean | void;
```
## Example
```ts
this.addCommand({
id: 'example-command',
name: 'Example command',
editorCheckCallback: (checking: boolean, editor: Editor, view: MarkdownView) => {
const value = getRequiredValue();
if (value) {
if (!checking) {
doCommand(value);
}
return true;
}
return false;
}
});
```
0.12.2