editor-tab.js revision dbf2c770f8178b12e8fe3c36bfa29df58ef13959
/**
* @module editor
* @submodule editor-tab
*/
/**
* @class EditorTab
* @constructor
* @extends Base
* @namespace Plugin
*/
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');