| 45 | | return !lastChild |
| 46 | | || lastChild.type == CKEDITOR.NODE_ELEMENT && lastChild.name == 'br' |
| 47 | | // Some of the controls in form needs extension too, |
| 48 | | // to move cursor at the end of the form. (#4791) |
| 49 | | || block.name == 'form' && lastChild.name == 'input'; |
| | 45 | if( !extendEmptyBlock || |
| | 46 | typeof extendEmptyBlock == 'function' && ( extendEmptyBlock( block ) == false ) ) |
| | 47 | return false; |
| | 48 | |
| | 49 | return !lastChild || lastChild && |
| | 50 | ( lastChild.type == CKEDITOR.NODE_ELEMENT && lastChild.name == 'br' |
| | 51 | // Some of the controls in form needs extension too, |
| | 52 | // to move cursor at the end of the form. (#4791) |
| | 53 | || block.name == 'form' && lastChild.name == 'input' ); |
| 58 | | if ( CKEDITOR.env.ie ) |
| 59 | | block.add( new CKEDITOR.htmlParser.text( '\xa0' ) ); |
| 60 | | else |
| 61 | | block.add( new CKEDITOR.htmlParser.element( 'br', {} ) ); |
| 62 | | } |
| 63 | | } |
| 64 | | |
| 65 | | function extendBlockForOutput( block ) |
| 66 | | { |
| 67 | | trimFillers( block ); |
| 68 | | |
| 69 | | if ( blockNeedsExtension( block ) ) |
| 70 | | block.add( new CKEDITOR.htmlParser.text( '\xa0' ) ); |
| | 60 | trimFillers( node, !isOutput ); |
| | 61 | if ( blockNeedsExtension( node, !isOutput || emptyBlockFiller ) ) |
| | 62 | { |
| | 63 | if ( isOutput || CKEDITOR.env.ie ) |
| | 64 | node.add( new CKEDITOR.htmlParser.text( '\xa0' ) ); |
| | 65 | else |
| | 66 | node.add( new CKEDITOR.htmlParser.element( 'br', {} ) ); |
| | 67 | } |
| | 68 | } |
| | 493 | |
| | 494 | /** |
| | 495 | * Whether in the HTML output editor will insert a filler text (non-breaking space entity - ) into empty block |
| | 496 | * elements, in order to render such block element at an empty line height. |
| | 497 | * @name CKEDITOR.config.fillEmptyBlocks; |
| | 498 | * @type Boolean|Function a judging bool or a mediation function. |
| | 499 | * @default true |
| | 500 | * @example |
| | 501 | * config.fillEmptyBlocks = false; // Prevent filler nodes in all empty blocks. |
| | 502 | * |
| | 503 | * // Prevent filler node only in float cleaners. |
| | 504 | * config.fillEmptyBlocks = function( element ) |
| | 505 | * { |
| | 506 | * if ( element.attributes[ 'class' ].indexOf ( 'clear-both' ) != -1 ) |
| | 507 | * return false; |
| | 508 | * } |
| | 509 | */ |
| | 510 | |