Force IE contentEditable element to create line breaks on Enter key, without breaking Undo

前端 未结 7 1821
时光取名叫无心
时光取名叫无心 2020-12-05 06:59

On Internet Explorer, a contentEditable DIV creates a new paragraph (

) each time you press Enter whereas Firefox creates a
<
7条回答
  •  一整个雨季
    2020-12-05 07:49

    Consider using when using Internet Explorer. You may not want to do this with Chrome because the focus looks funny. You will probably want to implement your own onfocus and onblur code.

提交回复
热议问题