0

For some reason IE wraps each newline with a <p> tag and it's causing some issues with the multi line banner I have.

I know Chrome wraps it in div and Firefox has a br tag, and I'm trying to strip the p tags to replace it with a <br> after a newline. Every time I enter a newline IE puts in a <p></br></p> and I've tried many different ways using jQuery selectors and splitting the HTML and joining it but nothing has worked so far.

How can I fix this to make it mimic either Chrome or Firefox's behavior? thanks

Daniel
  • 10,641
  • 12
  • 47
  • 85
Sarah Kazi
  • 71
  • 6
  • 1
    Possible duplicate of [Force IE contentEditable element to create line breaks on Enter key, without breaking Undo](https://stackoverflow.com/questions/2220939/force-ie-contenteditable-element-to-create-line-breaks-on-enter-key-without-bre) – Heretic Monkey Aug 13 '18 at 14:29
  • 2
    Please post your code and a simplified example to show us the issue – Huangism Aug 13 '18 at 14:29

0 Answers0