Hi,
Is there any way to make a event handler for keydown event in the editor pane? I tried various places in fckeditor.html (table cells, rows, object, textarea, etc) but the only I could achieve is to bind it in the menu area .... no the text editiing area where it would be more helpful of course.
Any help?
Thanks,
Ilkka
Is there any way to make a event handler for keydown event in the editor pane? I tried various places in fckeditor.html (table cells, rows, object, textarea, etc) but the only I could achieve is to bind it in the menu area .... no the text editiing area where it would be more helpful of course.
Any help?
Thanks,
Ilkka
RE: Javascript: Binding onkeydown to Ctlr-S
<script language="javascript" event="onkeydown(event)" for="objContent">
alert("key pressed");
</script>
But the problem is now that I cannot access the event object itself from anywhere. No window.event, objContent.event or anything exist.
Help needed!
RE: Javascript: Binding onkeydown to Ctrl-S
RE: Javascript: Binding onkeydown to Ctlr-S
I found and successfully tested following solution (include it into fckeditor.html):
<SCRIPT language="javascript" event="onkeydown()" for="objContent">
<!--
var event = objContent.DOM.parentWindow.event; // here is the trick !
if(event.keyCode == 83 && event.ctrlKey){
// save our state
}
...
-->
</SCRIPT>