Skip to content

Commit 53bb0b7

Browse files
committed
docs: update commandManager docs for htmlName field
1 parent 2be54a0 commit 53bb0b7

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

docs/API-Reference/command/CommandManager.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ const CommandManager = brackets.getModule("command/CommandManager")
1313
* [.getID()](#Command+getID) ⇒ <code>string</code>
1414
* [.execute()](#Command+execute) ⇒ <code>$.Promise</code>
1515
* [.getEnabled()](#Command+getEnabled) ⇒ <code>boolean</code>
16+
* [.getOptions()](#Command+getOptions) ⇒ <code>object</code>
1617
* [.setEnabled(enabled)](#Command+setEnabled)
1718
* [.setChecked(checked)](#Command+setChecked)
1819
* [.getChecked()](#Command+getChecked) ⇒ <code>boolean</code>
19-
* [.setName(name)](#Command+setName)
20+
* [.setName(name, htmlName)](#Command+setName)
2021
* [.getName()](#Command+getName) ⇒ <code>string</code>
2122

2223
<a name="new_Command_new"></a>
@@ -54,6 +55,12 @@ Executes the command. Additional arguments are passed to the executing function
5455
### command.getEnabled() ⇒ <code>boolean</code>
5556
Is command enabled?
5657

58+
**Kind**: instance method of [<code>Command</code>](#Command)
59+
<a name="Command+getOptions"></a>
60+
61+
### command.getOptions() ⇒ <code>object</code>
62+
get the command options
63+
5764
**Kind**: instance method of [<code>Command</code>](#Command)
5865
<a name="Command+setEnabled"></a>
5966

@@ -87,7 +94,7 @@ Is command checked?
8794
**Kind**: instance method of [<code>Command</code>](#Command)
8895
<a name="Command+setName"></a>
8996

90-
### command.setName(name)
97+
### command.setName(name, htmlName)
9198
Sets the name of the Command and dispatches "nameChange" so that
9299
UI that reflects the command name can update.
93100

@@ -97,9 +104,10 @@ use \uXXXX instead of an HTML entity.
97104

98105
**Kind**: instance method of [<code>Command</code>](#Command)
99106

100-
| Param | Type |
101-
| --- | --- |
102-
| name | <code>string</code> |
107+
| Param | Type | Description |
108+
| --- | --- | --- |
109+
| name | <code>string</code> | |
110+
| htmlName | <code>string</code> | If set, this will be displayed in ui menus instead of the name given. Eg. "Phoenix menu<i class='fa fa-car' style='margin-left: 4px;'></i>" |
103111

104112
<a name="Command+getName"></a>
105113

@@ -156,6 +164,7 @@ Registers a global command.
156164
| commandFn | <code>function</code> | the function to call when the command is executed. Any arguments passed to execute() (after the id) are passed as arguments to the function. If the function is asynchronous, it must return a jQuery promise that is resolved when the command completes. Otherwise, the CommandManager will assume it is synchronous, and return a promise that is already resolved. |
157165
| [options] | <code>Object</code> | |
158166
| 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+
| options.htmlName | <code>string</code> | If set, this will be displayed in ui menus instead of the name given. Eg. "Phoenix menu<i class='fa fa-car' style='margin-left: 4px;'></i>" |
159168

160169
<a name="registerInternal"></a>
161170

docs/API-Reference/command/Commands.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,12 @@ Opens documentation
734734
## HELP\_SUPPORT
735735
Opens support resources
736736

737+
**Kind**: global variable
738+
<a name="HELP_GET_PRO"></a>
739+
740+
## HELP\_GET\_PRO
741+
Opens Phoenix Pro page
742+
737743
**Kind**: global variable
738744
<a name="HELP_SUGGEST"></a>
739745

0 commit comments

Comments
 (0)