(I'm not really sure where bug reports go. I posted this to the Help forum but got no reply. Trying here. I just want to be sure if this is a bug it gets to the right people.)
CKEditor Version: 3.6.4
Browser: Safari 6 or Chrome 21
We have a problem where empty paragraphs or breaks get added to the end of the source without cause. I have boiled it down to a simple case. You can reproduce it easily in the CKEditor demo here:
Steps to reproduce:
1: Open a CKEditor
2: Click Source to switch to source code view
3: Enter this HTML:
NOTE: The problem won't happen with just any source. This is the simplest example I could find that demonstrates it, although there are probably many other examples. But just a DIV or P won't cause the problem.
4: Click Source again to switch back to WYSWYG mode.
5: Select the word "test" in the editor and make it bold.
6: Click Source again to switch back to source mode.
=> A new empty paragraph has been added to the bottom of the source.
NOTE: If you set config.enterMode to BREAK, then it will add a break tag instead.
Is there something we can do to stop this from happening? It's driving my poor users crazy. They have to constantly switch to source before they save and trim off the extra junk so it doesn't space out their web pages.
Re: P tags added to end of source when applying styles
This issue has been reported (https://dev.ckeditor.com/ticket/8419). It's being worked on. According to Fred it will be fixed in CKEditor 4.
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!