You are not logged in.
I found the solution by reviewing core source code and it's HTMLArea._addEvents
here is a example :
hookXinhaEditorsSimple = function (xinhaEditors) {
var editorId;
var xinhaEditor;
if (xinhaEditors) {
for (editorId in xinhaEditors) {
xinhaEditor=xinhaEditors[editorId];
HTMLArea._addEvents(
xinhaEditor._doc,
['keypress'],
function (event) {
event=HTMLArea.is_ie ? xinhaEditor._iframe.contentWindow.event : event;
/*
below line is important because ie has a global event object for each
document and as long as htmlarea is inside iframe source element should
indicate that iframe
*/
convert(event.srcElement, event);
return xinhaEditor._editorEvent(event);
}
);
document.getElementById(editorId).onkeypress=function (e) {};
}
}
}
hope you enjoy ;-)
Last edited by sinasalek (2006-12-16 05:25:42)
Sina.Salek.WS
Offline