i have (2) textareas. one is a regular textarea the other is and the reference for an CKEditor. when a user types in the CKEditor i want each keypress to be triggered and shown in the regular textarea. how do i do this?
this is my non-working code:
CKEDITOR.instances.ckeditor1.on('key', function (e)
{
var je = $.Event("keyup");
je.which = e.data.keyCode;
textArea.bind(je, private.bindKeyup);
textArea.trigger(je);
});
this is my non-working code:
CKEDITOR.instances.ckeditor1.on('key', function (e)
{
var je = $.Event("keyup");
je.which = e.data.keyCode;
textArea.bind(je, private.bindKeyup);
textArea.trigger(je);
});

Re: How to trigger key press
Re: How to trigger key press
editor.on('key', function (e) { var event = document.createEvent("KeyboardEvent"); // or KeysEvent var charCode = e.data.keyCode; // at the moment this is wrong, keyCode needs to be properly converted to charCode event.initKeyEvent("keypress",true,true,null,false,false,false,false,0,charCode); var x = document.getElementById('yourTextareaId'); x.dispatchEvent(event); }http://stackoverflow.com/questions/4846 ... romewebkit
http://stackoverflow.com/questions/8277 ... ks-with-ie