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 WYMed开发者_开发百科itor. Is there any other method than preventdefault()
and handle it ?
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).
精彩评论