|
166 | 166 | // In output HTML: Filler should be consistently &NBSP; <BR> at the end of block is always considered as bogus.
|
167 | 167 | // In Wysiwyg HTML: Browser dependent - Filler is either BR for non-IE, or &NBSP; for IE, <BR> is NEVER considered as bogus for IE.
|
168 | 168 | function createBogusAndFillerRules( editor, type ) {
|
169 |
| - var rules = { elements: {} }; |
170 |
| - var isOutput = type == 'html'; |
171 |
| - |
172 |
| - // Build the list of text blocks. |
173 |
| - var textBlockTags = CKEDITOR.tools.extend( {}, blockLikeTags ); |
174 |
| - for ( var i in textBlockTags ) { |
175 |
| - if ( !( '#' in dtd[ i ] ) ) |
176 |
| - delete textBlockTags[ i ]; |
177 |
| - } |
178 |
| - |
179 |
| - for ( i in textBlockTags ) |
180 |
| - rules.elements[ i ] = blockFilter( isOutput, editor.config.fillEmptyBlocks !== false ); |
181 |
| - |
182 |
| - // Editable element is to be checked separately. |
183 |
| - rules.root = blockFilter( isOutput ); |
184 |
| - rules.elements.br = brFilter( isOutput ); |
185 |
| - return rules; |
186 |
| - |
187 | 169 | function createFiller( isOutput ) {
|
188 | 170 | return isOutput || CKEDITOR.env.ie ?
|
189 | 171 | new CKEDITOR.htmlParser.text( '\xa0' ) :
|
|
335 | 317 | var last = getLast( block );
|
336 | 318 | return !last || block.name == 'form' && last.name == 'input' ;
|
337 | 319 | }
|
| 320 | + |
| 321 | + var rules = { elements: {} }; |
| 322 | + var isOutput = type == 'html'; |
| 323 | + |
| 324 | + // Build the list of text blocks. |
| 325 | + var textBlockTags = CKEDITOR.tools.extend( {}, blockLikeTags ); |
| 326 | + for ( var i in textBlockTags ) { |
| 327 | + if ( !( '#' in dtd[ i ] ) ) |
| 328 | + delete textBlockTags[ i ]; |
| 329 | + } |
| 330 | + |
| 331 | + for ( i in textBlockTags ) |
| 332 | + rules.elements[ i ] = blockFilter( isOutput, editor.config.fillEmptyBlocks !== false ); |
| 333 | + |
| 334 | + // Editable element is to be checked separately. |
| 335 | + rules.root = blockFilter( isOutput ); |
| 336 | + rules.elements.br = brFilter( isOutput ); |
| 337 | + return rules; |
338 | 338 | }
|
339 | 339 |
|
340 | 340 | function getFixBodyTag( config ) {
|
|
0 commit comments