Jan 26, 2012, 4:08 PM
[CLOSED] Problem with ?HtmlEditor? component in IE
Hi,we are having a problem with the ?HtmlEditor? component in IE. When the user tries to change the alignment of just one line of the text, the component change the alignment of all the text typed. Our first approach was to override the fixKeys method commenting four lines:
That solved the problem about the alignment, but now the HTML generated have the tags
Thank you
Ext.onReady(function () {
Ext.form.HtmlEditor.override({
fixKeys: function () { // load time branching for fastest keydown performance
if (Ext.isIE) {
return function (e) {
var me = this,
k = e.getKey(),
doc = me.getDoc(),
range, target;
if (k == e.TAB) {
e.stopEvent();
range = doc.selection.createRange();
if (range) {
range.collapse(true);
range.pasteHTML(' ');
me.deferFocus();
}
}
else if (k == e.ENTER) {
range = doc.selection.createRange();
if (range) {
target = range.parentElement();
if (!target || target.tagName.toLowerCase() !== 'li') {
// e.stopEvent();
// range.pasteHTML('<br />');
// range.collapse(false);
// range.select();
}
}
}
};
}
} ()
});
});
That solved the problem about the alignment, but now the HTML generated have the tags
<p></p>
in each line, creating a huge spacing between the lines and makes the text looks bad. Do you have any idea about how to solve this?Thank you
Last edited by Daniil; Jan 31, 2012 at 6:11 PM.
Reason: [CLOSED]