CKEDITOR 3.6.6.1
If I have the following html
<p> </p>
<p>testing why ___ d<strong>idn't </strong>show</p>
And then I load the editor, select everything, and apply a style I have defined the result is:
<p>
<span style="font-size:12pt;font-family:courier new;"></span></p>
<p>
<span style="font-size:12pt;font-family:courier new;">$$\sqrt[{}]{56}$$testing why ___ d<strong>idn't </strong>show</span></p>
Notice how the nbsp from the first paragraph is now gone. I have the following configuration:
CKEDITOR.config.forcePasteAsPlainText = false; // default
CKEDITOR.config.shiftEnterMode = CKEDITOR.ENTER_BR;
CKEDITOR.config.fillEmptyBlocks = function (element) {
return true; // DON'T DO ANYTHING!!!!!
};
CKEDITOR.dtd.$removeEmpty = { p: 0, abbr: 0, acronym: 0, b: 0, bdi: 0, bdo: 0, big: 0, cite: 0, code: 0, del: 0, dfn: 0, em: 0, font: 0, i: 0, ins: 0, label: 0, kbd: 0, mark: 0, meter: 0, output: 0, q: 0, ruby: 0, s: 0, samp: 0, small: 0, span: 0, strike: 0, strong: 0, sub: 0, sup: 0, time: 0, tt: 0, u: 0, 'var': 0 }; // don't remove anything
CKEDITOR.config.enterMode = CKEDITOR.ENTER_BR;
CKEDITOR.config.basicEntities = true;
CKEDITOR.config.entities = true;
CKEDITOR.config.entities_additional = '';
CKEDITOR.config.entities_latin = false;
CKEDITOR.config.entities_greek = false;
CKEDITOR.config.entities_processNumerical = false;
CKEDITOR.config.autoParagraph = false; // don't change anything
CKEDITOR.config.ignoreEmptyParagraph = false;