﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
9843	"""formatted"" option from the Format dropdown adds extra line break"	vijendra		"When I use CKEditor 4 with attached config.js and ontents.css files, then by hitting formatted option from the Format dropdown creates extra line break.

How to reproduce:

1. Go to CKEditor 4 demo page.
2. Set following configuration in config.js file

{{{
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

CKEDITOR.editorConfig = function (config) {
    // Define changes to default configuration here. For example:
    // config.language = 'fr';
    // config.uiColor = '#AADC6E';
    config.extraPlugins = 'syntaxhighlight,button-pre';
    //config.toolbar_Full.push(['Code']);
    config.resize_enabled = false;
};

/*
http://stackoverflow.com/questions/6969081/why-does-ckeditor-add-line-breaks-and-paragraph-before-initial-text
http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Output_Formatting
http://stackoverflow.com/questions/1977791/turn-off-enclosing-p-tags-in-ckeditor-3-0
*/
CKEDITOR.on('instanceReady', function (ev) {


    // Output paragraphs as <p>Text</p>.
    ev.editor.dataProcessor.writer.setRules('p',
{
    indent: false,
    breakBeforeOpen: false,
    breakAfterOpen: false,
    breakBeforeClose: false,
    breakAfterClose: false
});

    // Output paragraphs as <p>Text</p>.
    ev.editor.dataProcessor.writer.setRules('pre',
{
    indent: false,
    breakBeforeOpen: false,
    breakAfterOpen: false,
    breakBeforeClose: false,
    breakAfterClose: false
});

    // Output paragraphs as <p>Text</p>.
    ev.editor.dataProcessor.writer.setRules('br',
{
    indent: false,
    breakBeforeOpen: false,
    breakAfterOpen: false,
    breakBeforeClose: false,
    breakAfterClose: false
});

    // Output paragraphs as <p>Text</p>.
    ev.editor.dataProcessor.writer.setRules('div',
{
    indent: false,
    breakBeforeOpen: false,
    breakAfterOpen: false,
    breakBeforeClose: false,
    breakAfterClose: false
});

});

}}}

3. et following CSS in the contents.css file


{{{
p, pre
{
	margin:0;
	padding:0;

}
}}}
4. Add following text in the CKEditor 
""Test [[BR]]
Test [[BR]]
Test [[BR]]
Test [[BR]]
""

5. Select the 2,3 line and hit formatted option from the Format dropdown, you will notice that extra line breaks has been added."	Bug	closed	Normal		Core : Styles	4.0	invalid		vijendra.1007@…
