| | 327 | var startBlockParent = startBlock && startBlock.getParent(); |
| | 328 | if ( startBlockParent && startBlockParent.is( 'blockquote' ) ) |
| | 329 | { |
| | 330 | var previous = lineBreak.getPrevious( CKEDITOR.dom.walker.whitespaces(1) ), |
| | 331 | next = lineBreak.getNext( CKEDITOR.dom.walker.whitespaces(1) ); |
| | 332 | |
| | 333 | var isStartOfParent = range.checkBoundaryOfElement( startBlockParent, CKEDITOR.START ), |
| | 334 | isEndOfParent = range.checkBoundaryOfElement( startBlockParent, CKEDITOR.END ), |
| | 335 | isStartOfLine = isStartOfParent || ( previous && previous.is && previous.is( 'br' ) ), |
| | 336 | isEndOfLine = isEndOfParent || ( next && next.is && next.is( 'br' ) ); |
| | 337 | |
| | 338 | if ( isStartOfLine && isEndOfLine ) |
| | 339 | { |
| | 340 | if ( isStartOfParent ) |
| | 341 | lineBreak.remove().insertBefore( startBlockParent ); |
| | 342 | else if ( isEndOfParent ) |
| | 343 | lineBreak.remove().insertAfter( startBlockParent ); |
| | 344 | else |
| | 345 | lineBreak.breakParent( startBlockParent ); |
| | 346 | |
| | 347 | isStartOfParent && isEndOfParent && startBlockParent.remove(); |
| | 348 | |
| | 349 | // The "next" <br> is not needed any more at this point. |
| | 350 | next && next.remove(); |
| | 351 | |
| | 352 | // Except on IE, the previous and the new <br> will remain as bogus <br>s. |
| | 353 | if ( CKEDITOR.env.ie && previous ) |
| | 354 | previous.remove(); |
| | 355 | |
| | 356 | range.moveToPosition( lineBreak, CKEDITOR.POSITION_BEFORE_START ); |
| | 357 | |
| | 358 | if ( CKEDITOR.env.ie ) |
| | 359 | lineBreak.remove(); |
| | 360 | |
| | 361 | range.select(); |
| | 362 | return; |
| | 363 | } |
| | 364 | } |
| | 365 | |