editor-tab.js revision 9175593f652cde92e44c72344a4d77b017b75d2a
/**
* @class Plugin.EditorTab
* @constructor
* @extends Base
* @module editor
* @submodule editor-tab
*/
var EditorTab = function() {
}, HOST = 'host';
/**
* Listener for host's nodeChange event and captures the tabkey interaction.
* @private
* @method _onNodeChange
* @param {Event} e The Event facade passed from the host.
*/
_onNodeChange: function(e) {
var action = 'indent';
if (e.changedType === 'tab') {
e.changedEvent.halt();
e.preventDefault();
if (e.changedEvent.shiftKey) {
action = 'outdent';
}
}
}
},
initializer: function() {
}
}, {
/**
* editorTab
* @property NAME
* @static
*/
NAME: 'editorTab',
/**
* tab
* @property NS
* @static
*/
NS: 'tab',
ATTRS: {
host: {
value: false
}
}
});
Y.namespace('Plugin');