Skip to content

Commit c72892f

Browse files
committed
Merge branch 't/10537'
2 parents 5b01dc0 + 684e2fc commit c72892f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

core/filter.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,15 @@
135135
// Force ENTER_BR for blockless editable.
136136
this.enterMode = enterMode = ( editor.blockless ? CKEDITOR.ENTER_BR : editor.config.enterMode );
137137

138-
this.allow( 'br ' + ( enterMode == CKEDITOR.ENTER_P ? 'p' : enterMode == CKEDITOR.ENTER_DIV ? 'div' : '' ), 'default', 1 );
138+
var defaultRules = [ 'br' ],
139+
shiftEnterMode = editor.blockless ? CKEDITOR.ENTER_BR : editor.config.shiftEnterMode;
140+
141+
if ( enterMode == CKEDITOR.ENTER_P || shiftEnterMode == CKEDITOR.ENTER_P )
142+
defaultRules.push( 'p' );
143+
if ( enterMode == CKEDITOR.ENTER_DIV || shiftEnterMode == CKEDITOR.ENTER_DIV )
144+
defaultRules.push( 'div' );
145+
146+
this.allow( defaultRules.join( ' ' ), 'default', 1 );
139147
this.allow( allowedContent, 'config', 1 );
140148
this.allow( editor.config.extraAllowedContent, 'extra', 1 );
141149

0 commit comments

Comments
 (0)