The tabOverride namespace object
- Source:
Namespaces
Methods
-
<static> addExtension(hook, func) → {Object}
-
Adds an extension function to be executed when the specified hook is "fired." The extension function is called for each element and is passed any relevant arguments for the hook.
Parameters:
Name Type Description hook
string the name of the hook for which the extension will be registered func
function the function to be executed when the hook is "fired" - Source:
Returns:
the tabOverride object- Type
- Object
-
<static> autoIndent(enable) → {boolean|Object}
-
Gets or sets the auto indent setting. True if each line should be automatically indented (default = true).
Parameters:
Name Type Argument Description enable
boolean <optional>
whether auto indent should be enabled - Source:
Returns:
whether auto indent is enabled or the tabOverride object- Type
- boolean | Object
-
<static> set(elems, enable) → {Object}
-
Enables or disables Tab Override for the specified textarea element(s). Hooks: set - passed the current element and a boolean indicating whether Tab Override was enabled or disabled.
Parameters:
Name Type Argument Default Description elems
Element | Array.<Element> the textarea element(s) for which to enable or disable Tab Override enable
boolean <optional>
true whether Tab Override should be enabled for the element(s) - Source:
Returns:
the tabOverride object- Type
- Object
-
<static> tabKey(keyCode, modifierKeyNames) → {string|Object}
-
Gets or sets the tab key combination.
Parameters:
Name Type Argument Description keyCode
number the key code of the key to use for tab modifierKeyNames
string[] <optional>
the modifier key names - valid names are 'alt', 'ctrl', 'meta', and 'shift' - Source:
Returns:
the current tab key combination or the tabOverride object- Type
- string | Object
-
<static> tabSize(size) → {number|Object}
-
Gets or sets the tab size for all elements that have Tab Override enabled. 0 represents the tab character.
Parameters:
Name Type Argument Description size
number <optional>
the tab size - Source:
Returns:
the tab size or the tabOverride object- Type
- number | Object
-
<static> untabKey(keyCode, modifierKeyNames) → {string|Object}
-
Gets or sets the untab key combination.
Parameters:
Name Type Argument Description keyCode
number the key code of the key to use for untab modifierKeyNames
string[] <optional>
the modifier key names - valid names are 'alt', 'ctrl', 'meta', and 'shift' - Source:
Returns:
the current untab key combination or the tabOverride object- Type
- string | Object