ViewCommandHandlers
Import :
const ViewCommandHandlers = brackets.getModule("view/ViewCommandHandlers")
Commands
The ViewCommandHandlers object dispatches the following event(s):
- fontSizeChange -- Triggered when the font size is changed via the Increase Font Size, Decrease Font Size, or Restore Font Size commands. The 2nd arg to the listener is the amount of the change. The 3rd arg is a string containing the new font size after applying the change.
Kind: global variable
validFontSizeRegExpStr
Font sizes should be validated by this regexp
Kind: global variable
setFontSize(fontSize)
Font size setter to set the font size for the document editor
Kind: global function
Param | Type | Description |
---|---|---|
fontSize | string | The font size with size unit as 'px' or 'em' |
getFontSize() ⇒ string
Font size getter to get the current font size for the document editor
Kind: global function
Returns: string
- Font size with size unit as 'px' or 'em'
setFontFamily(fontFamily)
Font family setter to set the font family for the document editor
Kind: global function
Param | Type | Description |
---|---|---|
fontFamily | string | The font family to be set. It can be a string with multiple comma separated fonts |
getFontFamily() ⇒ string
Font family getter to get the currently configured font family for the document editor
Kind: global function
Returns: string
- The font family for the document editor
restoreFontSize()
Restores the font size using the saved style and migrates the old fontSizeAdjustment view state to the new fontSize, when required
Kind: global function
restoreFonts()
Restores the font size and font family back to factory settings.
Kind: global function