0

Using a contenteditable div as a rich text editor; I've noticed that every browser handles the enter key differently. (FF inserts <br>, IE <p>, and chrome <div>)

Whats the best way to go about making the enter key consistent with all browsers? Preferably avoiding having each use <p> because I dislike the double space that causes between lines.

Roko C. Buljan
  • 196,159
  • 39
  • 305
  • 313
user3362196
  • 102
  • 7
  • 1
    This topic is already discussed on SO and easy to Goog – Roko C. Buljan Jan 18 '15 at 05:52
  • http://stackoverflow.com/questions/18814094/how-to-create-a-paragraph-on-enter-in-a-contenteditable-div?rq=1 – Roko C. Buljan Jan 18 '15 at 05:53
  • http://stackoverflow.com/questions/19950350/behaviour-of-enter-key-in-contenteditable-div?rq=1 – Roko C. Buljan Jan 18 '15 at 05:54
  • http://stackoverflow.com/questions/23974533/insert-newline-on-enter-key-in-contenteditable-div?rq=1 – Roko C. Buljan Jan 18 '15 at 05:55
  • http://stackoverflow.com/questions/7737463/contenteditable-paragraph-tag-on-enter?rq=1 and so on and so on... – Roko C. Buljan Jan 18 '15 at 05:55
  • I've been reading questions on it for the past 2 hours and havn't found anything that works yet... – user3362196 Jan 18 '15 at 05:56
  • OK, I'll reopen your question if you show what you tried so far, posting a code that reproduces your issue - and with an explanation where you're stuck at. Tip: posting a comment on an already existing answer should help to get more clarifications from the Answerer. If you think your question is specific than you really need to show some code. – Roko C. Buljan Jan 18 '15 at 05:57

0 Answers0