Additional spaces inserted in CKeditor enterMode - cause problems in XML documents

I use CKEditor on my CMS website, which pops an XML file of CDATA content to be read using flash. The problem is that CKEditor, when its enterMode is set to tags <p>, creates a line break and a tab in the source, which, when read with flash, enters the space, although I ignored WhiteSpace set to true. Any way to prevent ckeditor from using this behavior?

EDIT:

I still want to keep the <p> tags entered inside the editor - I just don't want all the extra spaces / tabs to be added to the actual source. If I use the above method, my actual code will be changed. What I get if I consider the source is:

<p> 
    Donec at erat nec tortor sodales tempus.</p> 

(enter, and either a tab or a bunch of space after the first <p> tag and not:

<p>Donec at erat nec tortor sodales tempus.</p> 

(there are no spaces or gaps after the <p> tag in the source, and I believe this affects the presentation of XML. Does this help to clarify at all?

+3
source share
2 answers

I really solved this at the end of Flash using

TextField.condenseWhite = true;

and

XML.ignoreWhite = true;

Which does not change how CKEditor spits out the material, but it solves the problem of how the flash displays it.

0
source

Flash, , , , :

// Make output formatting match Flash expectations
var dtd = CKEDITOR.dtd;
for ( var e in CKEDITOR.tools.extend( {}, dtd.$nonBodyContent, dtd.$block, dtd.$listItem, dtd.$tableContent ) )
{
    dataProcessor.writer.setRules( e,
        {
            indent : false,
            breakBeforeOpen : false,
            breakAfterOpen : false,
            breakBeforeClose : false,
            breakAfterClose : false
        });
}
dataProcessor.writer.setRules( 'br',
    {
        indent : false,
        breakBeforeOpen : false,
        breakAfterOpen : false,
        breakBeforeClose : false,
        breakAfterClose : false
    });
+2

All Articles