function FCKeditor_OnComplete( editorInstance ) {
if (document.all) {
// IE
editorInstance.EditorDocument.attachEvent("onkeyup", my_function) ;
} else {
// other browser
editorInstance.EditorDocument.addEventListener( 'keyup', my_function, true ) ;
}
}
Tue, 12/18/2007 - 18:36
#1

Re: onKeyUp event handling: simple solution that works
TKS,It's very useful to me!
Re: onKeyUp event handling: simple solution that works
Re: onKeyUp event handling: simple solution that works
Re: onKeyUp event handling: simple solution that works
I was trying to build such event handler and I have issues with figuring out the actual editorInstance object that deals with the event itself.
How can I find the instance based on event object I get in handler?
Crirus
Re: onKeyUp event handling: simple solution that works
Here is my code...
function FCKeditor_OnComplete( editorInstance ) {
if (document.all) {
// IE
editorInstance.EditorDocument.attachEvent("onkeyup", callCounterUpdate) ;
} else {
// other browser
editorInstance.EditorDocument.addEventListener( 'onkeyup', callCounterUpdate, true ) ;
}
}
function callCounterUpdate()
{
alert("callCounterUpdate");
}
Nothing happens at all.
Could anyone explain what is going on here and how I might fix it to work?
Thanks you,
George.
Re: onKeyUp event handling: simple solution that works
editorInstance.EditorDocument.addEventListener( 'onkeyup', callCounterUpdate, true ) ;
Should be
editorInstance.EditorDocument.addEventListener( 'keyup', callCounterUpdate, true ) ;
Re: onKeyUp event handling: simple solution that works
====================
but when I press "Source" off and on ,so .... both in ie & ff , it's not work now..
Re: onKeyUp event handling: simple solution that works
Re: onKeyUp event handling: simple solution that works
Re: onKeyUp event handling: simple solution that works
Re: onKeyUp event handling: simple solution that works
Yeah, when u swtich to "Source" mode and swtich to "WSYIWYG" mode again, the onkeyup event will stop working .
Re: onKeyUp event handling: simple solution that works
I need some hook on keyup for multiple editor instances in the same page.
Thanks
Cris
Re: onKeyUp event handling: simple solution that works
K2.Bolgoodoh(document.getElementById("content_intro"))) ;
<textarea name="content_intro" id="content_intro" class="forminput"></textarea> <script type="text/javascript"> function FCKeditor_OnComplete( editorInstance ) { if (document.all) { // IE editorInstance.EditorDocument.attachEvent("onkeyup", K2.Bolgoodoh(document.getElementById("content_intro"))) ; } else { // other browser editorInstance.EditorDocument.addEventListener( 'keyup', K2.Bolgoodoh(document.getElementById("content_intro")), true ) ; } } </script> <script type="text/javascript"> var oFCKeditor = new FCKeditor('content_intro'); oFCKeditor.Value = ''; oFCKeditor.BasePath = '../rte/'; oFCKeditor.Height = 250; oFCKeditor.ReplaceTextarea(); </script>