logo

New Response

« Return to the main article

You are replying to:

    • avatar
    • Alan
    • Posted on Thu 21 Oct 2004

    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

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: