editor-tab.js revision 83e043b3f7e7c3d18f31d19ef5b3705d0b93cb65
/**
* @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');