Ticket #81 (closed defect: fixed)
BR inserted in PRE
Reported by: | ludo | Owned by: | jf.hovinne |
---|---|---|---|
Priority: | major | Milestone: | 0.5 |
Component: | editor | Version: | trunk |
Keywords: | Cc: |
Description
Wymeditor insists in adding BR elements inside PRE blocks. They are clearly useless, as a newline character is enough to break the line in a PRe block. And BRs are clearly annoying, especially when the block contains code that is passed to an external syntax highlighting plugin, where often the added BRs mess up everything.
Change History
comment:3 Changed 3 years ago by jf.hovinne
- Status changed from new to closed
- Resolution set to fixed
This is another designMode issue, and the solution isn't obvious, since the browsers needs the BR tags in order to edit the content.
I tried to fix this in the keydown/keyup events handlers, and got an headache.
Also tried the DOM replace with jQuery, which was a bad idea (see r623).
Finally, I think r625 does the trick, and removes the unwanted BR tags.
I just want to specify that br tags will be inserted if you edit it in the html mode and then switch to the styled view. This is a pretty serious bug.