View Full Version : HtmlEditor override initEditor CSS Issue

5 Feb 2013, 1:40 PM
I'm building an application where I'll have an HtmlEditor box followed by an editable grid. I'd like to be able to hit tab to move from the editor to the first grid row. Since HtmlEditor doesn't have a keydown event, I added one using the EventManager but it seems like something in the process is removing the css from the body tag of the editor. Anyone have any idea how to keep it working properly?

var editor = Ext.create('Ext.form.HtmlEditor', {
width: '100%',
height: 165,
renderTo: 'htmlEditor',
enableFont: false,
xtype: 'htmleditor'

initEditor : function() {
var me = this;
var doc = me.getDoc();
Ext.EventManager.on(doc, 'keydown', me.tabOut, me);

tabOut : function(e) {
if (Ext.EventObject.TAB == e.getKey()) {
// Do what you need here


6 Feb 2013, 8:22 AM
Turns out I needed to call 'this.superclass.initEditor.call(this);' inside the initEditor. It wasn't just a CSS issue, the standard calls made by initEditor weren't being called making the editor to not function properly.