You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns true if the command opted in to running while the workspace is in
70
+
design mode (editor collapsed). KeyBindingManager uses this to decide
71
+
whether a keyboard shortcut should fire; commands that don't opt in are
72
+
swallowed in design mode.
73
+
64
74
**Kind**: instance method of [<code>Command</code>](#Command)
65
75
<aname="Command+setEnabled"></a>
66
76
@@ -165,6 +175,7 @@ Registers a global command.
165
175
|[options]| <code>Object</code> ||
166
176
| options.eventSource | <code>boolean</code> | If set to true, the commandFn will be called with the first argument `event` with details about the source(invoker) as event.eventSource(one of the `CommandManager.SOURCE_*`) and event.sourceType(Eg. Ctrl-K) parameter. |
167
177
| options.htmlName | <code>string</code> | If set, this will be displayed in ui menus instead of the name given. Example: `"Phoenix menu<i class='fa fa-car' style='margin-left: 4px;'></i>"`|
178
+
| options.supportsDesignMode | <code>boolean</code> | If true, this command's keyboard shortcut will still fire when the workspace is in design mode. Commands that don't opt in are swallowed in design mode because the editor area is collapsed and most shortcuts are nonsensical there. Reserve this flag for commands that remain useful with no editor visible (file open/save/close, Quick Open, Find in Files, etc.). |
0 commit comments