If you type the following in source mode in ckeditor 3.4 (and 4.0)
and the switch to WYSIWYG mode and then back to source mode, you get the following
The expected result is that either the <br /> would be untouched (as they were in previous versions) or that the <br /> would be converted into <p> </p>.
If you switch back and forth from source mode to WYSIWYG mode, the resulting file keeps growing because of added spurious malformed html.
This defect has been reported in Ticket 9167 and confirmed but it seems that the developers are too busy to correct the problem and it is causing me big problems since we have numerous templates with stand alone br's.
Does anyone have an idea where in the ckeditor code I could look to try to correct this problem myself until the development team has time to do it right?
<p> line1</p> <br /> <p> line2</p>
and the switch to WYSIWYG mode and then back to source mode, you get the following
<p> line1</p> <p> </p> <p> <br /> <p> line2</p> </p> <p> </p>
The expected result is that either the <br /> would be untouched (as they were in previous versions) or that the <br /> would be converted into <p> </p>.
If you switch back and forth from source mode to WYSIWYG mode, the resulting file keeps growing because of added spurious malformed html.
This defect has been reported in Ticket 9167 and confirmed but it seems that the developers are too busy to correct the problem and it is causing me big problems since we have numerous templates with stand alone br's.
Does anyone have an idea where in the ckeditor code I could look to try to correct this problem myself until the development team has time to do it right?
Re: Problem with br tags
Add the following code to your config.js file:
Also, you seem to be using an older version of CKEditor because our demo doesn't produce the results you're getting: http://ckeditor.com/demo
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: Problem with br tags
Thanks for the quick response.
If you go to http://ckeditor.com/demo (CKEditor 3.6.4 (revision 7575))
1. clear the screen
2. go to source mode and type the following
Re: Problem with br tags
Sorry
Re: Problem with br tags
It shows up in IE 8 and IE 9.
This problem of turning <br /> into bad html is documented in confirmed ticket 9167.
This defect effects so many of my customers existing documents and I am desperate for a solution that doesn't involve all my custumers editing their documents.
TinyMCE doesn't have the problem and other HTML editors don't have the problem. They just convert the <br /> into <p> </p> as did earlier versions of CkEditor.
If anyone has any ideas (even bad ideas) on how to fix this problem, I'm all ears.
Thanks
Re: Problem with br tags
Type the following into the CKEditor demo site (3.6.5 (revision 7647)) using ie 8, 9 or ie 10 in source mode.
Switch to WYSIWYG mode and then back to source mode and look what it produces.
I would expect it to leave the source alone or produce
Switch back and forth between WYSIWYG mode and source mode a couple of times and look at the mess.
I am looking for help from anyone to help solve this problem.
You can try fixing it with
You can try fixing it with regular expressions. I am working on that very issue now. The problem is that converting a <br /> (which I will refer to as a br) into a <p> </p> (which I will refer to as a p-br) may embed the p-br into a paragraph without closing the preceding text off with a </p> and opening the remaining text with a <p>. You could add the closing and opening tag to the conversion, but then suppose the break is in a div instead of a p, or is free standing, like your typed in example. I am thinking about just converting all br's to spaces and dealing with it later. Will report if any further progress.
P.S. The br problem continued in 4.0.