views:

39

answers:

1

when I press 'enter' in contenteditable area a new <div> is produced what I rather want to add <br /> tag. How can I manipulate this behaviour. How is it done in WYMeditor. Is there any other method than preventdefault() and handle it ?

A: 

No. That's the way it's done. In IE, you need to set the event's returnValue property to false rather than call preventDefault() (note the capital D in the middle).

Tim Down