Eliminate Random line-height: <span> Tags

Mar 18, 2015 at 8:42 PM
Can you please help me figure out how I can restrict the text editor so that it will not allow any line-height <span> tags?

http://screencast.com/t/FrmB7vWU

For some reason, even though I have the editor set to FORCE PASTE AS PLAIN TEXT, the editor is sometimes putting in style tags in the code. I can't figure out what is causing this.

Here is an example:

<p>Father Gary Karenstien - Pastor<br />
<span style="line-height: 1.6em;">Toni Smith - </span><span style="line-height: 1.6em;">PAC Council President</span><br />

Is there a setting in the config that will allow me to restrict this? Where is the "line-height" style coming from?

I simply want the users to only be able to use the H1, H2, and styles that are pulling from the CSS.

Thank you for any help.
Apr 2, 2015 at 1:16 PM
According to the CKEditor this issue is caused by a bug in chrome. You can see the full issue report here (including a solution)

https://dev.ckeditor.com/ticket/9998#comment:52
Apr 2, 2015 at 1:24 PM
Thanks so much. Wow, that is a long thread. Do you know if this problem exists with Firefox?
Apr 2, 2015 at 1:42 PM
Of course not, its only an issue in chrome, which can be easily fixed by changing one line in the contents.css file.
Apr 2, 2015 at 1:46 PM
Thanks.

Can you please tell me what line of code I need to add to the contents.css file?

I was going to add this code to the config.js file based on this thread: http://ckeditor.com/forums/CKEditor/ckeditor-4.01-inserting-span-elements-everywhere-with-a-line-height-of-1.6em

(function() {
var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
if (isChrome) {
    CKEDITOR.on( 'instanceLoaded', function( e ){
        this.addCss('.cke_editable { line-height: normal; }');
    });
}
})();

I would rather just follow your lead and add the line of code to the contents.css file.
Apr 2, 2015 at 1:50 PM
Edited Apr 2, 2015 at 1:50 PM
Can you please tell me what line of code I need to add to the contents.css file?
I posted the link above

https://dev.ckeditor.com/ticket/9998#comment:52

change
.cke_editable
{
    font-size: 13px;
    line-height: 1.6;
}
to
.cke_editable
{
    font-size: 13px;
    line-height: normal 
}
Apr 2, 2015 at 1:52 PM
Thank you very much.