Thats not the complete function and thus would not work as is if you simply
copy it
Instead of CSS, you can use the onkeydown event:
if(event.keyCode==13){
//current range, created from current selection
//need to create the range here
//before you can paste anything into it
//this is a sample of creating a range
var sel = document.selection
rng = sel.createRange();
rng.pasteHTML('<BR>');
event.returnValue=false;
}
Thats not the complete function and thus would not work as is if you simply copy it
Instead of CSS, you can use the onkeydown event: if(event.keyCode==13){ //current range, created from current selection //need to create the range here //before you can paste anything into it //this is a sample of creating a range var sel = document.selection rng = sel.createRange(); rng.pasteHTML('<BR>'); event.returnValue=false; }
alan