Index: /FCKeditor/trunk/_whatsnew.html
===================================================================
--- /FCKeditor/trunk/_whatsnew.html (revision 1728)
+++ /FCKeditor/trunk/_whatsnew.html (revision 1729)
@@ -93,4 +93,6 @@
[#2024] Fixed
JavaScript error in IE when the user tries to open dialogs in Source mode.
+ [#1853] Setting
+ ShiftEnterMode to p or div now works correctly when EnterMode is br.
Index: /FCKeditor/trunk/editor/_source/classes/fckdomrange.js
===================================================================
--- /FCKeditor/trunk/editor/_source/classes/fckdomrange.js (revision 1728)
+++ /FCKeditor/trunk/editor/_source/classes/fckdomrange.js (revision 1729)
@@ -756,6 +756,8 @@
* NextBlock value if the range was at the end of the block.
*/
- SplitBlock : function()
- {
+ SplitBlock : function( forceBlockTag )
+ {
+ var blockTag = forceBlockTag || FCKConfig.EnterMode ;
+
if ( !this._Range )
this.MoveToSelection() ;
@@ -769,14 +771,14 @@
var oElementPath = null ;
- if ( FCKConfig.EnterMode != 'br' )
+ if ( blockTag != 'br' )
{
if ( !eStartBlock )
{
- eStartBlock = this.FixBlock( true ) ;
+ eStartBlock = this.FixBlock( true, blockTag ) ;
eEndBlock = this.EndBlock ; // FixBlock may have fixed the EndBlock too.
}
if ( !eEndBlock )
- eEndBlock = this.FixBlock( false ) ;
+ eEndBlock = this.FixBlock( false, blockTag ) ;
}
@@ -841,5 +843,5 @@
// Transform a block without a block tag in a valid block (orphan text in the body or td, usually).
- FixBlock : function( isStart )
+ FixBlock : function( isStart, blockTag )
{
// Bookmark the range so we can restore it later.
@@ -853,5 +855,5 @@
// Create the fixed block.
- var oFixedBlock = this.Window.document.createElement( FCKConfig.EnterMode ) ;
+ var oFixedBlock = this.Window.document.createElement( blockTag ) ;
// Move the contents of the temporary range to the fixed block.
Index: /FCKeditor/trunk/editor/_source/classes/fckenterkey.js
===================================================================
--- /FCKeditor/trunk/editor/_source/classes/fckenterkey.js (revision 1728)
+++ /FCKeditor/trunk/editor/_source/classes/fckenterkey.js (revision 1729)
@@ -399,5 +399,5 @@
var oRange = range || new FCKDomRange( this.Window ) ;
- var oSplitInfo = oRange.SplitBlock() ;
+ var oSplitInfo = oRange.SplitBlock( blockTag ) ;
if ( oSplitInfo )