const HTMLUtils = brackets.getModule("language/HTMLUtils")Key representing tag name
Key representing closing tag
Key representing attribute name
Key representing attribute value
Compiles a list of used attributes for a given tag.
Kind: global function
Returns: Array.<string> - - A list of the used attributes within the current tag.
| Param | Type | Description |
|---|---|---|
| editor | CodeMirror |
An instance of a CodeMirror editor. |
| pos | Object |
The position in the CodeMirror editor, specified by character and line numbers. |
Creates a tagInfo object and assures all the values are entered or are empty strings
Kind: global function
Returns: Object - A tagInfo object with some context about the current tag hint.
| Param | Type | Description |
|---|---|---|
| [tokenType] | string |
what is getting edited and should be hinted |
| [offset] | number |
where the cursor is for the part getting hinted |
| [tagName] | string |
The name of the tag |
| [attrName] | string |
The name of the attribute |
| [attrValue] | string |
The value of the attribute |
Figure out if we're in a tag, and if we are return info about it An example token stream for this tag is
<span id="open-files-disclosure-arrow"></span> :
className:tag string:"<span"
className: string:" "
className:attribute string:"id"
className: string:"="
className:string string:""open-files-disclosure-arrow""
className:tag string:"></span>"Kind: global function
Returns: Object - A tagInfo object with some context about the current tag hint.
| Param | Type | Description |
|---|---|---|
| editor | Editor |
An instance of a Brackets editor |
| constPos | Object |
A CM pos (likely from editor.getCursorPos()) |
| let | isHtmlMode:boolean |
the module know we are in html mode |
Returns an Array of info about all blocks whose token mode name matches that passed in, in the given Editor's HTML document (assumes the Editor contains HTML text).
Kind: global function
Returns: Object - Array
| Param | Type | Description |
|---|---|---|
| editor | Editor |
the editor containing the HTML text |
| modeName | string |
the mode name of the tokens to look for |
Returns an Array of info about all 'style' blocks in the given Editor's HTML document (assumes the Editor contains HTML text).
Kind: global function
Returns: Object - Array
| Param | Type |
|---|---|
| editor | Editor |