PDA

View Full Version : Google Chrome insertAtCursor Problem



swaitch
23 Mar 2011, 12:31 PM
I have an html editor in a form which upon activation and a keydown event inserts a time stamp. It works perfectly in IE and Firefox but when inserting text in Chrome it displays the text with the along with html tags. Anyone have any ideas on how to remedy this?



resolution.on('activate', function() {
Ext.fly(resolution.doc).on('keydown', function(event) {
var charCode = event.getCharCode();
if (charCode == 113) {
var timestamp = currTime();
resolution.insertAtCursor("<strong>" + timestamp + " " + readCookie('fullname').replace('+',' ') + " :&nbsp;</strong> ");
}
});
});


Output from Firefox and IE:
2011-3-23 14:30:05 Silas Aitchison :

Output from Chrome:
<strong>2011-3-23 14:30:05 John Doe :&nbsp;</strong>

swaitch
23 Mar 2011, 12:39 PM
I thought I had searched well enough for a fix to the problem but obviously not.

Look at this thread for an answer:
http://www.sencha.com/forum/showthread.php?70942-FIXED-3.0.0-Ext.HtmlEditor.insertAtCursor-and-Chrome