Ticket #7354: 7354_2.patch

File 7354_2.patch, 1.4 KB (added by Frederico Caldeira Knabben, 13 years ago)
  • _source/plugins/enterkey/plugin.js

     
    4848                                path = new CKEDITOR.dom.elementPath( range.startContainer ),
    4949                                block = path.block;
    5050
    51                         // Exit the list when we're inside an empty list item block. (#5376)
    5251                        if ( atBlockStart && atBlockEnd )
    5352                        {
     53                                // Exit the list when we're inside an empty list item block. (#5376)
    5454                                if ( block && ( block.is( 'li' ) || block.getParent().is( 'li' ) ) )
    5555                                {
    5656                                        editor.execCommand( 'outdent' );
    5757                                        return;
    5858                                }
     59
     60                                if ( block && block.getParent().is( 'blockquote' ) )
     61                                {
     62                                        block.breakParent( block.getParent() );
     63
     64                                        // If we were at the start of <blockquote>, there will be an empty element before it now.
     65                                        if ( !block.getPrevious().getFirst( CKEDITOR.dom.walker.invisible(1) ) )
     66                                                block.getPrevious().remove();
     67
     68                                        // If we were at the end of <blockquote>, there will be an empty element after it now.
     69                                        if ( !block.getNext().getFirst( CKEDITOR.dom.walker.invisible(1) ) )
     70                                                block.getNext().remove();
     71
     72                                        range.moveToElementEditStart( block );
     73                                        range.select();
     74                                        return;
     75                                }
    5976                        }
    6077                        // Don't split <pre> if we're in the middle of it, act as shift enter key.
    6178                        else if ( block && block.is( 'pre' ) )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy