484 | | // If is a header tag, or we are in a Shift+Enter (#77), |
485 | | // create a new block element (later in the code). |
486 | | if ( !this._HasShift && !(/^H[1-6]$/).test( sPreviousBlockTag ) ) |
| 484 | // If is a header tag, or we are in a Shift+Enter (#77), or |
| 485 | // ForceEnterMode, create a new block element (later in the code). |
| 486 | // Except in ForceEnterMode, if last block is same as block we want |
| 487 | // to create or a list item, clone the last block instead. This |
| 488 | // stops Enter always ending a list, and if a block has attributes |
| 489 | // (eg dir="rtl"), they're cloned to the new block |
| 490 | if ( !this._HasShift && !(/^H[1-6]$/).test( sPreviousBlockTag ) && |
| 491 | ( !FCKConfig.ForceEnterMode || sPreviousBlockTag == blockTag.toUpperCase() || sPreviousBlockTag == 'LI' ) ) |