Ticket #3609: 3609.patch

File 3609.patch, 1.9 KB (added by Tobiasz Cudnik, 15 years ago)
  • _source/core/htmlparser/fragment.js

     
    107107
    108108                                // Create a <p> in the fragment.
    109109                                currentNode = target;
    110                                 parser.onTagOpen( 'p', {} );
     110                                // Use P as default, when fixForBody unspecified.
     111                                parser.onTagOpen( !! fixForBody == fixForBody ? 'p' : fixForBody, {} );
    111112
    112113                                // The new target now is the <p>.
    113114                                target = currentNode;
     
    284285                        checkPending();
    285286
    286287                        if ( fixForBody && !currentNode.type )
    287                                 this.onTagOpen( 'p', {} );
     288                                // Use P as default, when fixForBody unspecified.
     289                                this.onTagOpen( !! fixForBody == fixForBody ? 'p' : fixForBody, {} );
    288290
    289291                        currentNode.add( new CKEDITOR.htmlParser.text( text ) );
    290292                };
     
    311313                        if ( fixForBody && !parent.type && !CKEDITOR.dtd.$body[ node.name ] )
    312314                        {
    313315                                currentNode = parent;
    314                                 parser.onTagOpen( 'p', {} );
     316                                // Use P as default, when fixForBody unspecified.
     317                                parser.onTagOpen( !! fixForBody == fixForBody ? 'p' : fixForBody, {} );
    315318                                parent = currentNode;
    316319                        }
    317320
  • _source/plugins/wysiwygarea/plugin.js

     
    404404
    405405                                                                // Get the HTML version of the data.
    406406                                                                if ( editor.dataProcessor )
    407                                                                         data = editor.dataProcessor.toHtml( data, ( editor.config.enterMode != CKEDITOR.ENTER_BR ) );
     407                                                                {
     408                                                                        var fixForBody = ( editor.config.enterMode != CKEDITOR.ENTER_BR )
     409                                                                                ? editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p' : false;
     410                                                                        data = editor.dataProcessor.toHtml( data, fixForBody );
     411                                                                }
    408412
    409413                                                                data =
    410414                                                                        editor.config.docType +
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy