<script type="text/javascript">
$(function() {
$("#resizable").resizable().draggable();
$('#resizable').append('<iframe id="rte" width="100%" height="100%" ></iframe>');
myeditor = document.getElementById("rte").contentWindow.document;
myeditor.designMode = "on";
$('#rte').bind('keypress', function(e) {
var code = (e.keyCode ? e.keyCode : e.which);
alert(code);
return false;
});
});
</script>
In the script above i create an iframe and set it to design mode. now i need to know which keys where pressed, so i bind a keypress event to iframe. but that doesnt work :( is there a way to do it?