[geeklog-cvs] Geeklog-1.x/public_html/fckeditor/editor/_source/classes fckhtmliterator.js, NONE, 1.1 fckcontextmenu.js, 1.3, 1.4 fckdataprocessor.js, 1.1, 1.2 fckdocumentfragment_gecko.js, 1.1, 1.2 fckdocumentfragment_ie.js, 1.1, 1.2 fckdomrange.js, 1.1, 1.2 fckdomrange_gecko.js, 1.1, 1.2 fckdomrange_ie.js, 1.1, 1.2 fckdomrangeiterator.js, 1.1, 1.2 fckeditingarea.js, 1.4, 1.5 fckelementpath.js, 1.1, 1.2 fckenterkey.js, 1.1, 1.2 fckevents.js, 1.5, 1.6 fckicon.js, 1.3, 1.4 fckiecleanup.js, 1.3, 1.4 fckimagepreloader.js, 1.1, 1.2 fckkeystrokehandler.js, 1.1, 1.2 fckmenublock.js, 1.4, 1.5 fckmenublockpanel.js, 1.3, 1.4 fckmenuitem.js, 1.4, 1.5 fckpanel.js, 1.4, 1.5 fckplugin.js, 1.5, 1.6 fckspecialcombo.js, 1.6, 1.7 fckstyle.js, 1.1, 1.2 fcktoolbar.js, 1.6, 1.7 fcktoolbarbreak_gecko.js, 1.5, 1.6 fcktoolbarbreak_ie.js, 1.6, 1.7 fcktoolbarbutton.js, 1.5, 1.6 fcktoolbarbuttonui.js, 1.4, 1.5 fcktoolbarfontformatcombo.js, 1.5, 1.6 fcktoolbarfontscombo.js, 1.5, 1.6 fcktoolbarfontsizecombo.js, 1.5, 1.6 fcktoolbarpanelbutton.js, 1.5, 1.6 fcktoolbarspecialco mbo.js, 1.5, 1.6 fcktoolbarstylecombo.js, 1.5, 1.6 fckw3crange.js, 1.1, 1.2 fckxml.js, 1.1, 1.2 fckxml_gecko.js, 1.5, 1.6 fckxml_ie.js, 1.5, 1.6
Blaine Lang
blaine at qs1489.pair.com
Sun May 4 20:35:27 EDT 2008
Update of /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes
In directory qs1489.pair.com:/tmp/cvs-serv85146/editor/_source/classes
Modified Files:
fckcontextmenu.js fckdataprocessor.js
fckdocumentfragment_gecko.js fckdocumentfragment_ie.js
fckdomrange.js fckdomrange_gecko.js fckdomrange_ie.js
fckdomrangeiterator.js fckeditingarea.js fckelementpath.js
fckenterkey.js fckevents.js fckicon.js fckiecleanup.js
fckimagepreloader.js fckkeystrokehandler.js fckmenublock.js
fckmenublockpanel.js fckmenuitem.js fckpanel.js fckplugin.js
fckspecialcombo.js fckstyle.js fcktoolbar.js
fcktoolbarbreak_gecko.js fcktoolbarbreak_ie.js
fcktoolbarbutton.js fcktoolbarbuttonui.js
fcktoolbarfontformatcombo.js fcktoolbarfontscombo.js
fcktoolbarfontsizecombo.js fcktoolbarpanelbutton.js
fcktoolbarspecialcombo.js fcktoolbarstylecombo.js
fckw3crange.js fckxml.js fckxml_gecko.js fckxml_ie.js
Added Files:
fckhtmliterator.js
Log Message:
Upgraded the FCKeditor to version 2.6 Final - latest release April 7/08
Index: fckmenuitem.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckmenuitem.js,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** fckmenuitem.js 9 Feb 2008 12:53:57 -0000 1.4
--- fckmenuitem.js 5 May 2008 00:35:23 -0000 1.5
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 22,26 ****
*/
! var FCKMenuItem = function( parentMenuBlock, name, label, iconPathOrStripInfoArray, isDisabled )
{
this.Name = name ;
--- 22,26 ----
*/
! var FCKMenuItem = function( parentMenuBlock, name, label, iconPathOrStripInfoArray, isDisabled, customData )
{
this.Name = name ;
***************
*** 33,36 ****
--- 33,37 ----
this.SubMenu.Parent = parentMenuBlock ;
this.SubMenu.OnClick = FCKTools.CreateEventListener( FCKMenuItem_SubMenu_OnClick, this ) ;
+ this.CustomData = customData ;
if ( FCK.IECleanup )
***************
*** 39,46 ****
! FCKMenuItem.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled )
{
this.HasSubMenu = true ;
! return this.SubMenu.AddItem( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled ) ;
}
--- 40,47 ----
! FCKMenuItem.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData )
{
this.HasSubMenu = true ;
! return this.SubMenu.AddItem( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) ;
}
***************
*** 158,160 ****
{
this.MainElement = null ;
! }
\ No newline at end of file
--- 159,161 ----
{
this.MainElement = null ;
! }
Index: fckmenublock.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckmenublock.js,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** fckmenublock.js 9 Feb 2008 12:53:57 -0000 1.4
--- fckmenublock.js 5 May 2008 00:35:23 -0000 1.5
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 33,39 ****
}
! FCKMenuBlock.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled )
{
! var oItem = new FCKMenuItem( this, name, label, iconPathOrStripInfoArrayOrIndex, isDisabled ) ;
oItem.OnClick = FCKTools.CreateEventListener( FCKMenuBlock_Item_OnClick, this ) ;
--- 33,39 ----
}
! FCKMenuBlock.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData )
{
! var oItem = new FCKMenuItem( this, name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) ;
oItem.OnClick = FCKTools.CreateEventListener( FCKMenuBlock_Item_OnClick, this ) ;
***************
*** 111,115 ****
{
menuBlock._Window.focus() ;
!
// Due to the event model provided by Opera, we need to set
// HasFocus here as the above focus() call will not fire the focus
--- 111,115 ----
{
menuBlock._Window.focus() ;
!
// Due to the event model provided by Opera, we need to set
// HasFocus here as the above focus() call will not fire the focus
***************
*** 151,153 ****
eCell.className = 'MN_Separator' ;
eCell.appendChild( oDoc.createElement( 'DIV' ) ).className = 'MN_Separator_Line' ;
! }
\ No newline at end of file
--- 151,153 ----
eCell.className = 'MN_Separator' ;
eCell.appendChild( oDoc.createElement( 'DIV' ) ).className = 'MN_Separator_Line' ;
! }
Index: fckelementpath.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckelementpath.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckelementpath.js 9 Feb 2008 12:53:56 -0000 1.1
--- fckelementpath.js 5 May 2008 00:35:23 -0000 1.2
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 39,42 ****
--- 39,44 ----
var sElementName = e.nodeName.toLowerCase() ;
+ if ( FCKBrowserInfo.IsIE && e.scopeName != 'HTML' )
+ sElementName = e.scopeName.toLowerCase() + ':' + sElementName ;
if ( !eBlockLimit )
***************
*** 75,88 ****
{
var childNodes = element.childNodes ;
!
for ( var i = 0, count = childNodes.length ; i < count ; i++ )
{
var child = childNodes[i] ;
!
if ( child.nodeType == 1 && FCKListsLib.BlockElements[ child.nodeName.toLowerCase() ] )
return true ;
}
!
return false ;
}
-
--- 77,89 ----
{
var childNodes = element.childNodes ;
!
for ( var i = 0, count = childNodes.length ; i < count ; i++ )
{
var child = childNodes[i] ;
!
if ( child.nodeType == 1 && FCKListsLib.BlockElements[ child.nodeName.toLowerCase() ] )
return true ;
}
!
return false ;
}
Index: fcktoolbarpanelbutton.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fcktoolbarpanelbutton.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fcktoolbarpanelbutton.js 9 Feb 2008 12:53:57 -0000 1.5
--- fcktoolbarpanelbutton.js 5 May 2008 00:35:23 -0000 1.6
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 49,52 ****
--- 49,60 ----
var oPanel = FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( this.CommandName )._Panel ;
+ this.RegisterPanel( oPanel ) ;
+ }
+
+ FCKToolbarPanelButton.prototype.RegisterPanel = function( oPanel )
+ {
+ if ( oPanel._FCKToolbarPanelButton )
+ return ;
+
oPanel._FCKToolbarPanelButton = this ;
***************
*** 55,59 ****
eLineDiv.style.top = '0px' ;
! var eLine = this.LineImg = eLineDiv.appendChild( oPanel.Document.createElement( 'IMG' ) ) ;
eLine.className = 'TB_ConnectionLine' ;
eLine.style.position = 'absolute' ;
--- 63,67 ----
eLineDiv.style.top = '0px' ;
! var eLine = oPanel._FCKToolbarPanelButtonLineDiv = eLineDiv.appendChild( oPanel.Document.createElement( 'IMG' ) ) ;
eLine.className = 'TB_ConnectionLine' ;
eLine.style.position = 'absolute' ;
***************
*** 75,81 ****
oButton._UIButton.ChangeState( FCK_TRISTATE_ON ) ;
! oButton.LineImg.style.width = ( e.offsetWidth - 2 ) + 'px' ;
! FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( oButton.CommandName ).Execute( 0, e.offsetHeight - 1, e ) ; // -1 to be over the border
}
--- 83,92 ----
oButton._UIButton.ChangeState( FCK_TRISTATE_ON ) ;
! // oButton.LineImg.style.width = ( e.offsetWidth - 2 ) + 'px' ;
! var oCommand = FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( oButton.CommandName ) ;
! var oPanel = oCommand._Panel ;
! oPanel._FCKToolbarPanelButtonLineDiv.style.width = ( e.offsetWidth - 2 ) + 'px' ;
! oCommand.Execute( 0, e.offsetHeight - 1, e ) ; // -1 to be over the border
}
Index: fckw3crange.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckw3crange.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckw3crange.js 9 Feb 2008 12:53:57 -0000 1.1
--- fckw3crange.js 5 May 2008 00:35:23 -0000 1.2
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 262,278 ****
// If the start container has children and the offset is pointing
// to a child, then we should start from its previous sibling.
! if ( startNode.childNodes.length > 0 && startOffset <= startNode.childNodes.length - 1 )
{
! // If the offset points to the first node, we don't have a
! // sibling, so let's use the first one, but mark it for removal.
! if ( startOffset == 0 )
! {
! // Let's create a temporary node and mark it for removal.
! startNode = startNode.insertBefore( this._Document.createTextNode(''), startNode.firstChild ) ;
! removeStartNode = true ;
! }
! else
! startNode = startNode.childNodes[ startOffset ].previousSibling ;
}
}
--- 262,282 ----
// If the start container has children and the offset is pointing
// to a child, then we should start from its previous sibling.
!
! // If the offset points to the first node, we don't have a
! // sibling, so let's use the first one, but mark it for removal.
! if ( startOffset == 0 )
{
! // Let's create a temporary node and mark it for removal.
! startNode = startNode.insertBefore( this._Document.createTextNode(''), startNode.firstChild ) ;
! removeStartNode = true ;
}
+ else if ( startOffset > startNode.childNodes.length - 1 )
+ {
+ // Let's create a temporary node and mark it for removal.
+ startNode = startNode.appendChild( this._Document.createTextNode('') ) ;
+ removeStartNode = true ;
+ }
+ else
+ startNode = startNode.childNodes[ startOffset ].previousSibling ;
}
***************
*** 420,424 ****
{
var endIndex = FCKDomTools.GetIndexOf( topEnd ) ;
!
// If the start node is to be removed, we must correct the
// index to reflect the removal.
--- 424,428 ----
{
var endIndex = FCKDomTools.GetIndexOf( topEnd ) ;
!
// If the start node is to be removed, we must correct the
// index to reflect the removal.
Index: fckpanel.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckpanel.js,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** fckpanel.js 9 Feb 2008 12:53:57 -0000 1.4
--- fckpanel.js 5 May 2008 00:35:23 -0000 1.5
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 36,42 ****
--- 36,65 ----
{
// Create the Popup that will hold the panel.
+ // The popup has to be created before playing with domain hacks, see #1666.
this._Popup = this._Window.createPopup() ;
+
+ // this._Window cannot be accessed while playing with domain hacks, but local variable is ok.
+ // See #1666.
+ var pDoc = this._Window.document ;
+
+ // This is a trick to IE6 (not IE7). The original domain must be set
+ // before creating the popup, so we are able to take a refence to the
+ // document inside of it, and the set the proper domain for it. (#123)
+ if ( FCK_IS_CUSTOM_DOMAIN && !FCKBrowserInfo.IsIE7 )
+ {
+ pDoc.domain = FCK_ORIGINAL_DOMAIN ;
+ document.domain = FCK_ORIGINAL_DOMAIN ;
+ }
+
oDocument = this.Document = this._Popup.document ;
+ // Set the proper domain inside the popup.
+ if ( FCK_IS_CUSTOM_DOMAIN )
+ {
+ oDocument.domain = FCK_RUNTIME_DOMAIN ;
+ pDoc.domain = FCK_RUNTIME_DOMAIN ;
+ document.domain = FCK_RUNTIME_DOMAIN ;
+ }
+
FCK.IECleanup.AddItem( this, FCKPanel_Cleanup ) ;
}
***************
*** 55,76 ****
} ) ;
! if ( this._Window == window.parent && window.frameElement )
! {
! var scrollPos = null ;
! if ( FCKBrowserInfo.IsGecko && FCK && FCK.EditorDocument )
! scrollPos = [ FCK.EditorDocument.body.scrollLeft, FCK.EditorDocument.body.scrollTop ] ;
! window.frameElement.parentNode.insertBefore( oIFrame, window.frameElement ) ;
! if ( scrollPos )
! {
! var restoreFunc = function()
! {
! FCK.EditorDocument.body.scrollLeft = scrollPos[0] ;
! FCK.EditorDocument.body.scrollTop = scrollPos[1] ;
! }
! setTimeout( restoreFunc, 500 ) ;
! }
! }
! else
! this._Window.document.body.appendChild( oIFrame ) ;
var oIFrameWindow = oIFrame.contentWindow ;
--- 78,82 ----
} ) ;
! this._Window.document.body.appendChild( oIFrame ) ;
var oIFrameWindow = oIFrame.contentWindow ;
***************
*** 88,91 ****
--- 94,100 ----
oDocument.close() ;
+ if( FCKBrowserInfo.IsAIR )
+ FCKAdobeAIR.Panel_Contructor( oDocument, window.document.location ) ;
+
FCKTools.AddEventListenerEx( oIFrameWindow, 'focus', FCKPanel_Window_OnFocus, this ) ;
FCKTools.AddEventListenerEx( oIFrameWindow, 'blur', FCKPanel_Window_OnBlur, this ) ;
***************
*** 175,181 ****
}
// Be sure we'll not have more than one Panel opened at the same time.
! if ( FCKPanel._OpenedPanel )
! FCKPanel._OpenedPanel.Hide() ;
FCKDomTools.SetElementStyles( eMainNode,
--- 184,201 ----
}
+ // Toggle the iframe scrolling attribute to prevent the panel
+ // scrollbars from disappearing in FF Mac. (#191)
+ if ( FCKBrowserInfo.IsGecko && FCKBrowserInfo.IsMac )
+ {
+ this._IFrame.scrolling = '' ;
+ FCKTools.RunFunction( function(){ this._IFrame.scrolling = 'no'; }, this ) ;
+ }
+
// Be sure we'll not have more than one Panel opened at the same time.
! // Do not unlock focus manager here because we're displaying another floating panel
! // instead of returning the editor to a "no panel" state (Bug #1514).
! if ( FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel &&
! FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel != this )
! FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel.Hide( false, true ) ;
FCKDomTools.SetElementStyles( eMainNode,
***************
*** 206,210 ****
// Minus the offsets provided by any positioned parent element of the panel iframe.
! var positionedAncestor = FCKDomTools.GetPositionedAncestor( FCKTools.GetElementWindow( this._IFrame ), this._IFrame.parentNode ) ;
if ( positionedAncestor )
{
--- 226,230 ----
// Minus the offsets provided by any positioned parent element of the panel iframe.
! var positionedAncestor = FCKDomTools.GetPositionedAncestor( this._IFrame.parentNode ) ;
if ( positionedAncestor )
{
***************
*** 242,248 ****
}
- if ( x < 0 )
- x = 0 ;
-
// Set the context menu DIV in the specified location.
FCKDomTools.SetElementStyles( this._IFrame,
--- 262,265 ----
***************
*** 252,273 ****
} ) ;
- var iWidth = iMainWidth ;
- var iHeight = eMainNode.offsetHeight ;
-
- this._IFrame.width = iWidth ;
- this._IFrame.height = iHeight ;
-
// Move the focus to the IFRAME so we catch the "onblur".
this._IFrame.contentWindow.focus() ;
! FCKPanel._OpenedPanel = this ;
! }
! this._IsOpened = true ;
FCKTools.RunFunction( this.OnShow, this ) ;
}
! FCKPanel.prototype.Hide = function( ignoreOnHide )
{
if ( this._Popup )
--- 269,293 ----
} ) ;
// Move the focus to the IFRAME so we catch the "onblur".
this._IFrame.contentWindow.focus() ;
+ this._IsOpened = true ;
! var me = this ;
! this._resizeTimer = setTimeout( function()
! {
! var iWidth = eMainNode.offsetWidth || eMainNode.firstChild.offsetWidth ;
! var iHeight = eMainNode.offsetHeight ;
! me._IFrame.width = iWidth ;
! me._IFrame.height = iHeight ;
! }, 0 ) ;
!
! FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel = this ;
! }
FCKTools.RunFunction( this.OnShow, this ) ;
}
! FCKPanel.prototype.Hide = function( ignoreOnHide, ignoreFocusManagerUnlock )
{
if ( this._Popup )
***************
*** 279,283 ****
// Enable the editor to fire the "OnBlur".
! if ( typeof( FCKFocusManager ) != 'undefined' )
FCKFocusManager.Unlock() ;
--- 299,303 ----
// Enable the editor to fire the "OnBlur".
! if ( typeof( FCKFocusManager ) != 'undefined' && !ignoreFocusManagerUnlock )
FCKFocusManager.Unlock() ;
***************
*** 287,290 ****
--- 307,316 ----
this._IsOpened = false ;
+
+ if ( this._resizeTimer )
+ {
+ clearTimeout( this._resizeTimer ) ;
+ this._resizeTimer = null ;
+ }
if ( this.ParentPanel )
Index: fcktoolbarbutton.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fcktoolbarbutton.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fcktoolbarbutton.js 9 Feb 2008 12:53:57 -0000 1.5
--- fcktoolbarbutton.js 5 May 2008 00:35:23 -0000 1.6
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 49,60 ****
FCKToolbarButton.prototype.RefreshState = function()
{
// Gets the actual state.
var eState = FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( this.CommandName ).GetState() ;
// If there are no state changes than do nothing and return.
! if ( eState == this._UIButton.State ) return ;
// Sets the actual state.
! this._UIButton.ChangeState( eState ) ;
}
--- 49,65 ----
FCKToolbarButton.prototype.RefreshState = function()
{
+ var uiButton = this._UIButton ;
+
+ if ( !uiButton )
+ return ;
+
// Gets the actual state.
var eState = FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( this.CommandName ).GetState() ;
// If there are no state changes than do nothing and return.
! if ( eState == uiButton.State ) return ;
// Sets the actual state.
! uiButton.ChangeState( eState ) ;
}
***************
*** 74,76 ****
// Sets the actual state.
this._UIButton.ChangeState( FCK_TRISTATE_DISABLED ) ;
! }
\ No newline at end of file
--- 79,81 ----
// Sets the actual state.
this._UIButton.ChangeState( FCK_TRISTATE_DISABLED ) ;
! }
Index: fcktoolbarfontscombo.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fcktoolbarfontscombo.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fcktoolbarfontscombo.js 9 Feb 2008 12:53:57 -0000 1.5
--- fcktoolbarfontscombo.js 5 May 2008 00:35:23 -0000 1.6
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
Index: fcktoolbarbreak_ie.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fcktoolbarbreak_ie.js,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** fcktoolbarbreak_ie.js 9 Feb 2008 12:53:57 -0000 1.6
--- fcktoolbarbreak_ie.js 5 May 2008 00:35:23 -0000 1.7
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
Index: fckenterkey.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckenterkey.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckenterkey.js 9 Feb 2008 12:53:56 -0000 1.1
--- fckenterkey.js 5 May 2008 00:35:23 -0000 1.2
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 394,400 ****
var oRange = range || new FCKDomRange( this.Window ) ;
! var oSplitInfo = oRange.SplitBlock() ;
!
! // FCKDebug.OutputObject( oSplitInfo ) ;
if ( oSplitInfo )
--- 394,398 ----
var oRange = range || new FCKDomRange( this.Window ) ;
! var oSplitInfo = oRange.SplitBlock( blockTag ) ;
if ( oSplitInfo )
***************
*** 407,414 ****
var bIsEndOfBlock = oSplitInfo.WasEndOfBlock ;
// If we have both the previous and next blocks, it means that the
// boundaries were on separated blocks, or none of them where on the
// block limits (start/end).
! if ( !oSplitInfo.WasStartOfBlock && !oSplitInfo.WasEndOfBlock )
{
// If the next block is an <li> with another list tree as the first child
--- 405,428 ----
var bIsEndOfBlock = oSplitInfo.WasEndOfBlock ;
+ // If there is one block under a list item, modify the split so that the list item gets split as well. (Bug #1647)
+ if ( eNextBlock )
+ {
+ if ( eNextBlock.parentNode.nodeName.IEquals( 'li' ) )
+ {
+ FCKDomTools.BreakParent( eNextBlock, eNextBlock.parentNode ) ;
+ FCKDomTools.MoveNode( eNextBlock, eNextBlock.nextSibling, true ) ;
+ }
+ }
+ else if ( ePreviousBlock && ePreviousBlock.parentNode.nodeName.IEquals( 'li' ) )
+ {
+ FCKDomTools.BreakParent( ePreviousBlock, ePreviousBlock.parentNode ) ;
+ oRange.MoveToElementEditStart( ePreviousBlock.nextSibling );
+ FCKDomTools.MoveNode( ePreviousBlock, ePreviousBlock.previousSibling ) ;
+ }
+
// If we have both the previous and next blocks, it means that the
// boundaries were on separated blocks, or none of them where on the
// block limits (start/end).
! if ( !bIsStartOfBlock && !bIsEndOfBlock )
{
// If the next block is an <li> with another list tree as the first child
***************
*** 416,420 ****
if ( eNextBlock.nodeName.IEquals( 'li' ) && eNextBlock.firstChild
&& eNextBlock.firstChild.nodeName.IEquals( ['ul', 'ol'] ) )
! eNextBlock.insertBefore( eNextBlock.ownerDocument.createTextNode( '\xa0' ), eNextBlock.firstChild ) ;
// Move the selection to the end block.
if ( eNextBlock )
--- 430,434 ----
if ( eNextBlock.nodeName.IEquals( 'li' ) && eNextBlock.firstChild
&& eNextBlock.firstChild.nodeName.IEquals( ['ul', 'ol'] ) )
! eNextBlock.insertBefore( FCKTools.GetElementDocument( eNextBlock ).createTextNode( '\xa0' ), eNextBlock.firstChild ) ;
// Move the selection to the end block.
if ( eNextBlock )
***************
*** 463,467 ****
if ( element == elementPath.Block || element == elementPath.BlockLimit )
break ;
!
if ( FCKListsLib.InlineChildReqElements[ element.nodeName.toLowerCase() ] )
{
--- 477,481 ----
if ( element == elementPath.Block || element == elementPath.BlockLimit )
break ;
!
if ( FCKListsLib.InlineChildReqElements[ element.nodeName.toLowerCase() ] )
{
***************
*** 483,487 ****
{
// Move the selection to the new block.
! oRange.MoveToNodeContents( eNewBlock ) ;
oRange.Select() ;
}
--- 497,501 ----
{
// Move the selection to the new block.
! oRange.MoveToElementEditStart( eNewBlock ) ;
oRange.Select() ;
}
Index: fckspecialcombo.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckspecialcombo.js,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** fckspecialcombo.js 9 Feb 2008 12:53:57 -0000 1.6
--- fckspecialcombo.js 5 May 2008 00:35:23 -0000 1.7
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 38,42 ****
this._Panel = new FCKPanel( parentWindow || window ) ;
! this._Panel.AppendStyleSheet( FCKConfig.SkinPath + 'fck_editor.css' ) ;
this._PanelBox = this._Panel.MainNode.appendChild( this._Panel.Document.createElement( 'DIV' ) ) ;
this._PanelBox.className = 'SC_Panel' ;
--- 38,42 ----
this._Panel = new FCKPanel( parentWindow || window ) ;
! this._Panel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ;
this._PanelBox = this._Panel.MainNode.appendChild( this._Panel.Document.createElement( 'DIV' ) ) ;
this._PanelBox.className = 'SC_Panel' ;
***************
*** 83,87 ****
if ( this.Items )
this.Items = {} ;
!
var itemsholder = this._ItemsHolderEl ;
while ( itemsholder.firstChild )
--- 83,87 ----
if ( this.Items )
this.Items = {} ;
!
var itemsholder = this._ItemsHolderEl ;
while ( itemsholder.firstChild )
Index: fckdomrange_gecko.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckdomrange_gecko.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckdomrange_gecko.js 9 Feb 2008 12:53:56 -0000 1.1
--- fckdomrange_gecko.js 5 May 2008 00:35:23 -0000 1.2
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 102,104 ****
selection.removeAllRanges() ;
selection.addRange( domRange ) ;
! }
\ No newline at end of file
--- 102,104 ----
selection.removeAllRanges() ;
selection.addRange( domRange ) ;
! }
Index: fckcontextmenu.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckcontextmenu.js,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** fckcontextmenu.js 9 Feb 2008 12:53:56 -0000 1.3
--- fckcontextmenu.js 5 May 2008 00:35:23 -0000 1.4
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 27,31 ****
var oPanel = this._Panel = new FCKPanel( parentWindow ) ;
! oPanel.AppendStyleSheet( FCKConfig.SkinPath + 'fck_editor.css' ) ;
oPanel.IsContextMenu = true ;
--- 27,31 ----
var oPanel = this._Panel = new FCKPanel( parentWindow ) ;
! oPanel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ;
oPanel.IsContextMenu = true ;
***************
*** 57,63 ****
}
! FCKContextMenu.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled )
{
! var oItem = this._MenuBlock.AddItem( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled) ;
this._Redraw = true ;
return oItem ;
--- 57,67 ----
}
! /**
! The customData parameter is just a value that will be send to the command that is executed,
! so it's possible to reuse the same command for several items just by assigning different data for each one.
! */
! FCKContextMenu.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData )
{
! var oItem = this._MenuBlock.AddItem( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) ;
this._Redraw = true ;
return oItem ;
***************
*** 123,127 ****
if( !overrideButton )
{
! var doc = e.target.ownerDocument ;
overrideButton = FCKContextMenu_OverrideButton = doc.createElement('input') ;
overrideButton.type = 'button' ;
--- 127,131 ----
if( !overrideButton )
{
! var doc = FCKTools.GetElementDocument( e.target ) ;
overrideButton = FCKContextMenu_OverrideButton = doc.createElement('input') ;
overrideButton.type = 'button' ;
***************
*** 131,136 ****
}
! overrideButton.style.cssText = 'position:absolute;top:' + ( e.clientY - 2 ) +
! 'px;left:' + ( e.clientX - 2 ) +
'px;width:5px;height:5px;opacity:0.01' ;
}
--- 135,140 ----
}
! overrideButton.style.cssText = 'position:absolute;top:' + ( e.clientY - 2 ) +
! 'px;left:' + ( e.clientX - 2 ) +
'px;width:5px;height:5px;opacity:0.01' ;
}
***************
*** 156,159 ****
--- 160,164 ----
}
}
+ return true ;
}
***************
*** 176,180 ****
fckContextMenu._Redraw = false ;
}
!
// This will avoid that the content of the context menu can be dragged in IE
// as the content of the panel is recreated we need to do it every time
--- 181,185 ----
fckContextMenu._Redraw = false ;
}
!
// This will avoid that the content of the context menu can be dragged in IE
// as the content of the panel is recreated we need to do it every time
Index: fcktoolbarfontsizecombo.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fcktoolbarfontsizecombo.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fcktoolbarfontsizecombo.js 9 Feb 2008 12:53:57 -0000 1.5
--- fcktoolbarfontsizecombo.js 5 May 2008 00:35:23 -0000 1.6
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
Index: fcktoolbar.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fcktoolbar.js,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** fcktoolbar.js 9 Feb 2008 12:53:57 -0000 1.6
--- fcktoolbar.js 5 May 2008 00:35:23 -0000 1.7
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 101,103 ****
{
FCKTools.AppendElement( parentElement, 'div' ).className = 'TB_Separator' ;
! }
\ No newline at end of file
--- 101,103 ----
{
FCKTools.AppendElement( parentElement, 'div' ).className = 'TB_Separator' ;
! }
Index: fckiecleanup.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckiecleanup.js,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** fckiecleanup.js 9 Feb 2008 12:53:56 -0000 1.3
--- fckiecleanup.js 5 May 2008 00:35:23 -0000 1.4
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
Index: fckdomrange.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckdomrange.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckdomrange.js 9 Feb 2008 12:53:56 -0000 1.1
--- fckdomrange.js 5 May 2008 00:35:23 -0000 1.2
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 99,102 ****
--- 99,103 ----
return docFrag ;
}
+ return null ;
},
***************
*** 105,108 ****
--- 106,111 ----
if ( this._Range )
return this._Range.collapsed ;
+
+ return false ;
},
***************
*** 146,155 ****
MoveToElementEditStart : function( targetElement )
{
! var child ;
! while ( ( child = targetElement.firstChild ) && child.nodeType == 1 && FCKListsLib.EmptyElements[ child.nodeName.toLowerCase() ] == null )
! targetElement = child ;
! this.MoveToElementStart( targetElement ) ;
},
--- 149,166 ----
MoveToElementEditStart : function( targetElement )
{
! var editableElement ;
! while ( targetElement && targetElement.nodeType == 1 )
! {
! if ( FCKDomTools.CheckIsEditable( targetElement ) )
! editableElement = targetElement ;
! else if ( editableElement )
! break ; // If we already found an editable element, stop the loop.
! targetElement = targetElement.firstChild ;
! }
!
! if ( editableElement )
! this.MoveToElementStart( editableElement ) ;
},
***************
*** 737,741 ****
* - PreviousBlock : a reference to the block element that preceeds
* the range after the split.
! * - NextBlock : a reference to the block element that preceeds the
* range after the split.
* - WasStartOfBlock : a boolean indicating that the range was
--- 748,752 ----
* - PreviousBlock : a reference to the block element that preceeds
* the range after the split.
! * - NextBlock : a reference to the block element that follows the
* range after the split.
* - WasStartOfBlock : a boolean indicating that the range was
***************
*** 748,753 ****
* NextBlock value if the range was at the end of the block.
*/
! SplitBlock : function()
{
if ( !this._Range )
this.MoveToSelection() ;
--- 759,766 ----
* NextBlock value if the range was at the end of the block.
*/
! SplitBlock : function( forceBlockTag )
{
+ var blockTag = forceBlockTag || FCKConfig.EnterMode ;
+
if ( !this._Range )
this.MoveToSelection() ;
***************
*** 761,774 ****
var oElementPath = null ;
! if ( FCKConfig.EnterMode != 'br' )
{
if ( !eStartBlock )
{
! eStartBlock = this.FixBlock( true ) ;
eEndBlock = this.EndBlock ; // FixBlock may have fixed the EndBlock too.
}
if ( !eEndBlock )
! eEndBlock = this.FixBlock( false ) ;
}
--- 774,787 ----
var oElementPath = null ;
! if ( blockTag != 'br' )
{
if ( !eStartBlock )
{
! eStartBlock = this.FixBlock( true, blockTag ) ;
eEndBlock = this.EndBlock ; // FixBlock may have fixed the EndBlock too.
}
if ( !eEndBlock )
! eEndBlock = this.FixBlock( false, blockTag ) ;
}
***************
*** 833,837 ****
// Transform a block without a block tag in a valid block (orphan text in the body or td, usually).
! FixBlock : function( isStart )
{
// Bookmark the range so we can restore it later.
--- 846,850 ----
// Transform a block without a block tag in a valid block (orphan text in the body or td, usually).
! FixBlock : function( isStart, blockTag )
{
// Bookmark the range so we can restore it later.
***************
*** 845,849 ****
// Create the fixed block.
! var oFixedBlock = this.Window.document.createElement( FCKConfig.EnterMode ) ;
// Move the contents of the temporary range to the fixed block.
--- 858,862 ----
// Create the fixed block.
! var oFixedBlock = this.Window.document.createElement( blockTag ) ;
// Move the contents of the temporary range to the fixed block.
Index: fckimagepreloader.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckimagepreloader.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckimagepreloader.js 9 Feb 2008 12:53:56 -0000 1.1
--- fckimagepreloader.js 5 May 2008 00:35:23 -0000 1.2
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 62,64 ****
if ( (--imagePreloader._PreloadCount) == 0 && imagePreloader.OnComplete )
imagePreloader.OnComplete() ;
! }
\ No newline at end of file
--- 62,64 ----
if ( (--imagePreloader._PreloadCount) == 0 && imagePreloader.OnComplete )
imagePreloader.OnComplete() ;
! }
Index: fcktoolbarfontformatcombo.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fcktoolbarfontformatcombo.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fcktoolbarfontformatcombo.js 9 Feb 2008 12:53:57 -0000 1.5
--- fcktoolbarfontformatcombo.js 5 May 2008 00:35:23 -0000 1.6
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 35,39 ****
this.PanelWidth = 190 ;
!
this.DefaultLabel = FCKConfig.DefaultFontFormatLabel || '' ;
}
--- 35,39 ----
this.PanelWidth = 190 ;
!
this.DefaultLabel = FCKConfig.DefaultFontFormatLabel || '' ;
}
***************
*** 65,69 ****
div : aNames[9] || ( aNames[0] + ' (DIV)')
} ;
!
// Get the available formats from the configuration file.
var elements = FCKConfig.FontFormats.split(';') ;
--- 65,69 ----
div : aNames[9] || ( aNames[0] + ' (DIV)')
} ;
!
// Get the available formats from the configuration file.
var elements = FCKConfig.FontFormats.split(';') ;
Index: fckdocumentfragment_gecko.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckdocumentfragment_gecko.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckdocumentfragment_gecko.js 9 Feb 2008 12:53:56 -0000 1.1
--- fckdocumentfragment_gecko.js 5 May 2008 00:35:23 -0000 1.2
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 44,46 ****
FCKDomTools.InsertAfterNode( existingNode, this.RootNode ) ;
}
! }
\ No newline at end of file
--- 44,46 ----
FCKDomTools.InsertAfterNode( existingNode, this.RootNode ) ;
}
! }
Index: fckdocumentfragment_ie.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckdocumentfragment_ie.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckdocumentfragment_ie.js 9 Feb 2008 12:53:56 -0000 1.1
--- fckdocumentfragment_ie.js 5 May 2008 00:35:23 -0000 1.2
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 56,58 ****
FCKDomTools.InsertAfterNode( existingNode, eRoot.removeChild( eLast ) ) ;
}
! } ;
\ No newline at end of file
--- 56,58 ----
FCKDomTools.InsertAfterNode( existingNode, eRoot.removeChild( eLast ) ) ;
}
! } ;
Index: fckxml_gecko.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckxml_gecko.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fckxml_gecko.js 9 Feb 2008 12:53:57 -0000 1.5
--- fckxml_gecko.js 5 May 2008 00:35:23 -0000 1.6
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 27,52 ****
{
this.Error = false ;
- var oFCKXml = this ;
var oXmlHttp = FCKTools.CreateXmlObject( 'XmlHttp' ) ;
! oXmlHttp.open( "GET", urlToCall, false ) ;
oXmlHttp.send( null ) ;
if ( oXmlHttp.status == 200 || oXmlHttp.status == 304 )
! this.DOMDocument = oXmlHttp.responseXML ;
else if ( oXmlHttp.status == 0 && oXmlHttp.readyState == 4 )
! this.DOMDocument = oXmlHttp.responseXML ;
else
! this.DOMDocument = null ;
! if ( this.DOMDocument == null || this.DOMDocument.firstChild == null )
{
! this.Error = true ;
! if (window.confirm( 'Error loading "' + urlToCall + '"\r\nDo you want to see more info?' ) )
! alert( 'URL requested: "' + urlToCall + '"\r\n' +
! 'Server response:\r\nStatus: ' + oXmlHttp.status + '\r\n' +
! 'Response text:\r\n' + oXmlHttp.responseText ) ;
}
},
--- 27,67 ----
{
this.Error = false ;
+ var oXml ;
var oXmlHttp = FCKTools.CreateXmlObject( 'XmlHttp' ) ;
! oXmlHttp.open( 'GET', urlToCall, false ) ;
oXmlHttp.send( null ) ;
if ( oXmlHttp.status == 200 || oXmlHttp.status == 304 )
! oXml = oXmlHttp.responseXML ;
else if ( oXmlHttp.status == 0 && oXmlHttp.readyState == 4 )
! oXml = oXmlHttp.responseXML ;
else
! oXml = null ;
! if ( oXml )
{
! // Try to access something on it.
! try
! {
! var test = oXml.firstChild ;
! }
! catch (e)
! {
! // If document.domain has been changed (#123), we'll have a security
! // error at this point. The workaround here is parsing the responseText:
! // http://alexander.kirk.at/2006/07/27/firefox-15-xmlhttprequest-reqresponsexml-and-documentdomain/
! oXml = (new DOMParser()).parseFromString( oXmlHttp.responseText, 'text/xml' ) ;
! }
! }
+ if ( !oXml || !oXml.firstChild )
+ {
+ this.Error = true ;
+ if ( window.confirm( 'Error loading "' + urlToCall + '" (HTTP Status: ' + oXmlHttp.status + ').\r\nDo you want to see the server response dump?' ) )
+ alert( oXmlHttp.responseText ) ;
}
+
+ this.DOMDocument = oXml ;
},
***************
*** 85,87 ****
return null ;
}
! } ;
\ No newline at end of file
--- 100,102 ----
return null ;
}
! } ;
Index: fckxml_ie.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckxml_ie.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fckxml_ie.js 9 Feb 2008 12:53:57 -0000 1.5
--- fckxml_ie.js 5 May 2008 00:35:23 -0000 1.6
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 86,88 ****
return this.DOMDocument.selectSingleNode( xpath ) ;
}
! } ;
\ No newline at end of file
--- 86,88 ----
return this.DOMDocument.selectSingleNode( xpath ) ;
}
! } ;
Index: fckicon.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckicon.js,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** fckicon.js 9 Feb 2008 12:53:56 -0000 1.3
--- fckicon.js 5 May 2008 00:35:23 -0000 1.4
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 101,103 ****
return eIcon ;
! }
\ No newline at end of file
--- 101,103 ----
return eIcon ;
! }
Index: fckmenublockpanel.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckmenublockpanel.js,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** fckmenublockpanel.js 9 Feb 2008 12:53:57 -0000 1.3
--- fckmenublockpanel.js 5 May 2008 00:35:23 -0000 1.4
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 36,40 ****
{
var oPanel = this.Panel = ( this.Parent && this.Parent.Panel ? this.Parent.Panel.CreateChildPanel() : new FCKPanel() ) ;
! oPanel.AppendStyleSheet( FCKConfig.SkinPath + 'fck_editor.css' ) ;
// Call the "base" implementation.
--- 36,40 ----
{
var oPanel = this.Panel = ( this.Parent && this.Parent.Panel ? this.Parent.Panel.CreateChildPanel() : new FCKPanel() ) ;
! oPanel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ;
// Call the "base" implementation.
***************
*** 52,54 ****
if ( this.Panel.CheckIsOpened() )
this.Panel.Hide() ;
! }
\ No newline at end of file
--- 52,54 ----
if ( this.Panel.CheckIsOpened() )
this.Panel.Hide() ;
! }
Index: fcktoolbarbuttonui.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fcktoolbarbuttonui.js,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** fcktoolbarbuttonui.js 9 Feb 2008 12:53:57 -0000 1.4
--- fcktoolbarbuttonui.js 5 May 2008 00:35:23 -0000 1.5
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
Index: fckkeystrokehandler.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckkeystrokehandler.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckkeystrokehandler.js 9 Feb 2008 12:53:57 -0000 1.1
--- fckkeystrokehandler.js 5 May 2008 00:35:23 -0000 1.2
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 57,63 ****
// If the configuration for the keystrokes is missing some element or has any extra comma
// this item won't be valid, so skip it and keep on processing.
! if ( !keyDef )
continue ;
!
if ( typeof( keyDef[0] ) == 'object' ) // It is an array with arrays defining the keystrokes.
this.SetKeystrokes.apply( this, keyDef ) ;
--- 57,63 ----
// If the configuration for the keystrokes is missing some element or has any extra comma
// this item won't be valid, so skip it and keep on processing.
! if ( !keyDef )
continue ;
!
if ( typeof( keyDef[0] ) == 'object' ) // It is an array with arrays defining the keystrokes.
this.SetKeystrokes.apply( this, keyDef ) ;
Index: fckstyle.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckstyle.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckstyle.js 9 Feb 2008 12:53:57 -0000 1.1
--- fckstyle.js 5 May 2008 00:35:23 -0000 1.2
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 95,99 ****
* Apply the style to a FCKDomRange.
*/
! ApplyToRange : function( range, selectIt )
{
// ApplyToRange is not valid for FCK_STYLE_OBJECT types.
--- 95,99 ----
* Apply the style to a FCKDomRange.
*/
! ApplyToRange : function( range, selectIt, updateRange )
{
// ApplyToRange is not valid for FCK_STYLE_OBJECT types.
***************
*** 112,116 ****
}
! this.ApplyToRange( range, selectIt ) ;
},
--- 112,116 ----
}
! this.ApplyToRange( range, selectIt, updateRange ) ;
},
***************
*** 142,146 ****
* effect.
*/
! RemoveFromRange : function( range, selectIt )
{
var bookmark ;
--- 142,146 ----
* effect.
*/
! RemoveFromRange : function( range, selectIt, updateRange )
{
var bookmark ;
***************
*** 232,237 ****
this._RemoveOverrides( pathElement, styleOverrides[ pathElementName ] ) ;
! // Remove the element if no more attributes are available.
! this._RemoveNoAttribElement( pathElement ) ;
}
}
--- 232,238 ----
this._RemoveOverrides( pathElement, styleOverrides[ pathElementName ] ) ;
! // Remove the element if no more attributes are available and it's an inline style element
! if ( this.GetType() == FCK_STYLE_INLINE)
! this._RemoveNoAttribElement( pathElement ) ;
}
}
***************
*** 276,279 ****
--- 277,283 ----
range.SelectBookmark( bookmark ) ;
+ if ( updateRange )
+ range.MoveToBookmark( bookmark ) ;
+
return ;
}
***************
*** 283,287 ****
// Bookmark the range so we can re-select it after processing.
! var bookmark = range.CreateBookmark( true ) ;
// The style will be applied within the bookmark boundaries.
--- 287,291 ----
// Bookmark the range so we can re-select it after processing.
! bookmark = range.CreateBookmark( true ) ;
// The style will be applied within the bookmark boundaries.
***************
*** 401,404 ****
--- 405,411 ----
if ( selectIt )
range.SelectBookmark( bookmark ) ;
+
+ if ( updateRange )
+ range.MoveToBookmark( bookmark ) ;
},
***************
*** 487,491 ****
{
case FCK_STYLE_BLOCK :
! return this.CheckElementRemovable( elementPath.Block || elementPath.BlockLimit ) ;
case FCK_STYLE_INLINE :
--- 494,498 ----
{
case FCK_STYLE_BLOCK :
! return this.CheckElementRemovable( elementPath.Block || elementPath.BlockLimit, true ) ;
case FCK_STYLE_INLINE :
***************
*** 689,693 ****
}
! return ( valueA == valueB )
},
--- 696,701 ----
}
! // Return true if they match or if valueA is null and valueB is an empty string
! return ( valueA == valueB || ( ( valueA === null || valueA === '' ) && ( valueB === null || valueB === '' ) ) )
},
***************
*** 742,745 ****
--- 750,841 ----
/**
+ * Converting from a PRE block to a non-PRE block in formatting operations.
+ */
+ _FromPre : function( doc, block, newBlock )
+ {
+ var innerHTML = block.innerHTML ;
+
+ // Trim the first and last linebreaks immediately after and before <pre>, </pre>,
+ // if they exist.
+ // This is done because the linebreaks are not rendered.
+ innerHTML = innerHTML.replace( /(\r\n|\r)/g, '\n' ) ;
+ innerHTML = innerHTML.replace( /^[ \t]*\n/, '' ) ;
+ innerHTML = innerHTML.replace( /\n$/, '' ) ;
+
+ // 1. Convert spaces or tabs at the beginning or at the end to
+ innerHTML = innerHTML.replace( /^[ \t]+|[ \t]+$/g, function( match, offset, s )
+ {
+ if ( match.length == 1 ) // one space, preserve it
+ return ' ' ;
+ else if ( offset == 0 ) // beginning of block
+ return new Array( match.length ).join( ' ' ) + ' ' ;
+ else // end of block
+ return ' ' + new Array( match.length ).join( ' ' ) ;
+ } ) ;
+
+ // 2. Convert \n to <BR>.
+ // 3. Convert contiguous (i.e. non-singular) spaces or tabs to
+ var htmlIterator = new FCKHtmlIterator( innerHTML ) ;
+ var results = [] ;
+ htmlIterator.Each( function( isTag, value )
+ {
+ if ( !isTag )
+ {
+ value = value.replace( /\n/g, '<BR>' ) ;
+ value = value.replace( /[ \t]{2,}/g,
+ function ( match )
+ {
+ return new Array( match.length ).join( ' ' ) + ' ' ;
+ } ) ;
+ }
+ results.push( value ) ;
+ } ) ;
+ newBlock.innerHTML = results.join( '' ) ;
+ return newBlock ;
+ },
+
+ /**
+ * Converting from a non-PRE block to a PRE block in formatting operations.
+ */
+ _ToPre : function( doc, block, newBlock )
+ {
+ // Handle converting from a regular block to a <pre> block.
+ var innerHTML = block.innerHTML.Trim() ;
+
+ // 1. Delete ANSI whitespaces immediately before and after <BR> because they are not visible.
+ // 2. Mark down any <BR /> nodes here so they can be turned into \n in the next step and avoid being compressed.
+ innerHTML = innerHTML.replace( /[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi, '<BR />' ) ;
+
+ // 3. Compress other ANSI whitespaces since they're only visible as one single space previously.
+ // 4. Convert to spaces since is no longer needed in <PRE>.
+ // 5. Convert any <BR /> to \n. This must not be done earlier because the \n would then get compressed.
+ var htmlIterator = new FCKHtmlIterator( innerHTML ) ;
+ var results = [] ;
+ htmlIterator.Each( function( isTag, value )
+ {
+ if ( !isTag )
+ value = value.replace( /([ \t\n\r]+| )/g, ' ' ) ;
+ else if ( isTag && value == '<BR />' )
+ value = '\n' ;
+ results.push( value ) ;
+ } ) ;
+
+ // Assigning innerHTML to <PRE> in IE causes all linebreaks to be reduced to spaces.
+ // Assigning outerHTML to <PRE> in IE doesn't work if the <PRE> isn't contained in another node
+ // since the node reference is changed after outerHTML assignment.
+ // So, we need some hacks to workaround IE bugs here.
+ if ( FCKBrowserInfo.IsIE )
+ {
+ var temp = doc.createElement( 'div' ) ;
+ temp.appendChild( newBlock ) ;
+ newBlock.outerHTML = '<PRE>\n' + results.join( '' ) + '</PRE>' ;
+ newBlock = temp.removeChild( temp.firstChild ) ;
+ }
+ else
+ newBlock.innerHTML = results.join( '' ) ;
+ return newBlock ;
+ },
+
+ /**
* Apply an inline style to a FCKDomRange.
*
***************
*** 748,752 ****
* - Properly handle block containers like <div> and <blockquote>.
*/
! _ApplyBlockStyle : function( range, selectIt )
{
// Bookmark the range so we can re-select it after processing.
--- 844,848 ----
* - Properly handle block containers like <div> and <blockquote>.
*/
! _ApplyBlockStyle : function( range, selectIt, updateRange )
{
// Bookmark the range so we can re-select it after processing.
***************
*** 754,758 ****
if ( selectIt )
! bookmark = range.CreateBookmark( true ) ;
var iterator = new FCKDomRangeIterator( range ) ;
--- 850,854 ----
if ( selectIt )
! bookmark = range.CreateBookmark() ;
var iterator = new FCKDomRangeIterator( range ) ;
***************
*** 760,778 ****
var block ;
while( ( block = iterator.GetNextParagraph() ) ) // Only one =
{
// Create the new node right before the current one.
! var newBlock = block.parentNode.insertBefore( this.BuildElement( range.Window.document ), block ) ;
// Move everything from the current node to the new one.
! FCKDomTools.MoveChildren( block, newBlock ) ;
! // Delete the current node.
FCKDomTools.RemoveNode( block ) ;
}
// Re-select the original range.
if ( selectIt )
range.SelectBookmark( bookmark ) ;
},
--- 856,938 ----
var block ;
+ var doc = range.Window.document ;
+
+ var preBlocks = [] ;
+ var convertedPreBlocks = [] ;
+
while( ( block = iterator.GetNextParagraph() ) ) // Only one =
{
// Create the new node right before the current one.
! var newBlock = this.BuildElement( doc ) ;
// Move everything from the current node to the new one.
! var newBlockIsPre = newBlock.nodeName.IEquals( 'pre' ) ;
! var blockIsPre = block.nodeName.IEquals( 'pre' ) ;
! if ( newBlockIsPre && !blockIsPre )
! {
! newBlock = this._ToPre( doc, block, newBlock ) ;
! preBlocks.push( newBlock ) ;
! }
! else if ( !newBlockIsPre && blockIsPre )
! {
! newBlock = this._FromPre( doc, block, newBlock ) ;
! convertedPreBlocks.push( newBlock ) ;
! }
! else // Convering from a regular block to another regular block.
! FCKDomTools.MoveChildren( block, newBlock ) ;
! // Replace the current block.
! block.parentNode.insertBefore( newBlock, block ) ;
FCKDomTools.RemoveNode( block ) ;
}
+ // Merge adjacent <PRE> blocks for #1229.
+ for ( var i = 0 ; i < preBlocks.length - 1 ; i++ )
+ {
+ // Check if the next block in HTML equals the next <PRE> block generated.
+ if ( FCKDomTools.GetNextSourceElement( preBlocks[i], true, [], [], true ) != preBlocks[i+1] )
+ continue ;
+
+ // Merge the upper <PRE> block's content into the lower <PRE> block.
+ // Remove the upper <PRE> block.
+ preBlocks[i+1].innerHTML = preBlocks[i].innerHTML + '\n\n' + preBlocks[i+1].innerHTML ;
+ FCKDomTools.RemoveNode( preBlocks[i] ) ;
+ }
+
+ // Split converted <PRE> blocks for #1229.
+ for ( var i = 0 ; i < convertedPreBlocks.length ; i++ )
+ {
+ var currentBlock = convertedPreBlocks[i] ;
+ var lastNewBlock = null ;
+ for ( var j = 0 ; j < currentBlock.childNodes.length ; j++ )
+ {
+ var cursor = currentBlock.childNodes[j] ;
+
+ // If we have two <BR>s, and they're not at the beginning or the end,
+ // then we'll split up the contents following them into another block.
+ if ( cursor.nodeName.IEquals( 'br' ) && j != 0 && j != currentBlock.childNodes.length - 2
+ && cursor.nextSibling && cursor.nextSibling.nodeName.IEquals( 'br' ) )
+ {
+ FCKDomTools.RemoveNode( cursor.nextSibling ) ;
+ FCKDomTools.RemoveNode( cursor ) ;
+ j-- ; // restart at current index at next iteration
+ lastNewBlock = FCKDomTools.InsertAfterNode( lastNewBlock || currentBlock, doc.createElement( currentBlock.nodeName ) ) ;
+ continue ;
+ }
+
+ if ( lastNewBlock )
+ {
+ FCKDomTools.MoveNode( cursor, lastNewBlock ) ;
+ j-- ; // restart at current index at next iteration
+ }
+ }
+ }
+
// Re-select the original range.
if ( selectIt )
range.SelectBookmark( bookmark ) ;
+
+ if ( updateRange )
+ range.MoveToBookmark( bookmark ) ;
},
***************
*** 787,791 ****
* <span style="color: #ff0000;"><span style="background-color: #ffffff">XYZ</span></span>
*/
! _ApplyInlineStyle : function( range, selectIt )
{
var doc = range.Window.document ;
--- 947,951 ----
* <span style="color: #ff0000;"><span style="background-color: #ffffff">XYZ</span></span>
*/
! _ApplyInlineStyle : function( range, selectIt, updateRange )
{
var doc = range.Window.document ;
***************
*** 968,971 ****
--- 1128,1134 ----
if ( selectIt )
range.SelectBookmark( bookmark ) ;
+
+ if ( updateRange )
+ range.MoveToBookmark( bookmark ) ;
},
--- NEW FILE: fckhtmliterator.js ---
(This appears to be a binary file; contents omitted.)
Index: fckdomrange_ie.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckdomrange_ie.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckdomrange_ie.js 9 Feb 2008 12:53:56 -0000 1.1
--- fckdomrange_ie.js 5 May 2008 00:35:23 -0000 1.2
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 83,87 ****
// Create marker tags for the start and end boundaries.
var eStartMarker = this.GetBookmarkNode( bookmark, true ) ;
!
if ( !eStartMarker )
return ;
--- 83,87 ----
// Create marker tags for the start and end boundaries.
var eStartMarker = this.GetBookmarkNode( bookmark, true ) ;
!
if ( !eStartMarker )
return ;
***************
*** 113,118 ****
{
bIsStartMakerAlone = ( forceExpand || !eStartMarker.previousSibling || eStartMarker.previousSibling.nodeName.toLowerCase() == 'br' ) && !eStartMarker.nextSibing ;
!
! // Append a temporary <span> </span> before the selection.
// This is needed to avoid IE destroying selections inside empty
// inline elements, like <b></b> (#253).
--- 113,118 ----
{
bIsStartMakerAlone = ( forceExpand || !eStartMarker.previousSibling || eStartMarker.previousSibling.nodeName.toLowerCase() == 'br' ) && !eStartMarker.nextSibing ;
!
! // Append a temporary <span></span> before the selection.
// This is needed to avoid IE destroying selections inside empty
// inline elements, like <b></b> (#253).
***************
*** 122,126 ****
dummySpan.innerHTML = '' ; // Zero Width No-Break Space (U+FEFF). See #1359.
eStartMarker.parentNode.insertBefore( dummySpan, eStartMarker ) ;
!
if ( bIsStartMakerAlone )
{
--- 122,126 ----
dummySpan.innerHTML = '' ; // Zero Width No-Break Space (U+FEFF). See #1359.
eStartMarker.parentNode.insertBefore( dummySpan, eStartMarker ) ;
!
if ( bIsStartMakerAlone )
{
***************
*** 132,136 ****
}
}
!
if ( !this._Range )
this._Range = this.CreateRange() ;
--- 132,136 ----
}
}
!
if ( !this._Range )
this._Range = this.CreateRange() ;
***************
*** 144,150 ****
if ( bIsStartMakerAlone )
{
! // Move the selection start to include the temporary .
oIERange.moveStart( 'character', -1 ) ;
!
oIERange.select() ;
--- 144,150 ----
if ( bIsStartMakerAlone )
{
! // Move the selection start to include the temporary .
oIERange.moveStart( 'character', -1 ) ;
!
oIERange.select() ;
Index: fckplugin.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckplugin.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fckplugin.js 9 Feb 2008 12:53:57 -0000 1.5
--- fckplugin.js 5 May 2008 00:35:23 -0000 1.6
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 54,56 ****
// Add the main plugin script.
LoadScript( this.Path + 'fckplugin.js' ) ;
! }
\ No newline at end of file
--- 54,56 ----
// Add the main plugin script.
LoadScript( this.Path + 'fckplugin.js' ) ;
! }
Index: fckevents.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckevents.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fckevents.js 9 Feb 2008 12:53:56 -0000 1.5
--- fckevents.js 5 May 2008 00:35:23 -0000 1.6
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
Index: fckdataprocessor.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckdataprocessor.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckdataprocessor.js 9 Feb 2008 12:53:56 -0000 1.1
--- fckdataprocessor.js 5 May 2008 00:35:23 -0000 1.2
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 117,119 ****
return html ;
}
! } ;
\ No newline at end of file
--- 117,119 ----
return html ;
}
! } ;
Index: fcktoolbarspecialcombo.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fcktoolbarspecialcombo.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fcktoolbarspecialcombo.js 9 Feb 2008 12:53:57 -0000 1.5
--- fcktoolbarspecialcombo.js 5 May 2008 00:35:23 -0000 1.6
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 33,36 ****
--- 33,39 ----
this.SourceView = false ;
this.ContextSensitive = true ;
+ this.FieldWidth = null ;
+ this.PanelWidth = null ;
+ this.PanelMaxHeight = null ;
//this._LastValue = null ;
}
***************
*** 99,103 ****
{
this._LastValue = sValue ;
!
if ( !sValue || sValue.length == 0 )
{
--- 102,106 ----
{
this._LastValue = sValue ;
!
if ( !sValue || sValue.length == 0 )
{
Index: fcktoolbarbreak_gecko.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fcktoolbarbreak_gecko.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fcktoolbarbreak_gecko.js 9 Feb 2008 12:53:57 -0000 1.5
--- fcktoolbarbreak_gecko.js 5 May 2008 00:35:23 -0000 1.6
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 34,36 ****
targetElement.appendChild( oBreakDiv ) ;
! }
\ No newline at end of file
--- 34,36 ----
targetElement.appendChild( oBreakDiv ) ;
! }
Index: fckdomrangeiterator.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckdomrangeiterator.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckdomrangeiterator.js 9 Feb 2008 12:53:56 -0000 1.1
--- fckdomrangeiterator.js 5 May 2008 00:35:23 -0000 1.2
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 93,96 ****
--- 93,98 ----
var lastNode = this._LastNode ;
+ this._NextNode = null ;
+
while ( currentNode )
{
***************
*** 111,115 ****
var nodeName = currentNode.nodeName.toLowerCase() ;
! if ( boundarySet[ nodeName ] )
{
// <br> boundaries must be part of the range. It will
--- 113,117 ----
var nodeName = currentNode.nodeName.toLowerCase() ;
! if ( boundarySet[ nodeName ] && ( !FCKBrowserInfo.IsIE || currentNode.scopeName == 'HTML' ) )
{
// <br> boundaries must be part of the range. It will
***************
*** 129,134 ****
--- 131,143 ----
// including possibly skipped empty spaces. (#1603)
if ( range )
+ {
range.SetEnd( currentNode, 3, true ) ;
+ // The found boundary must be set as the next one at this
+ // point. (#1717)
+ if ( nodeName != 'br' )
+ this._NextNode = currentNode ;
+ }
+
closeRange = true ;
}
***************
*** 202,208 ****
{
range._UpdateElementInfo() ;
!
! if ( range.StartNode == range.EndNode
! && range.StartNode.parentNode == range.StartBlockLimit
&& range.StartNode.getAttribute && range.StartNode.getAttribute( '_fck_bookmark' ) )
range = null ;
--- 211,217 ----
{
range._UpdateElementInfo() ;
!
! if ( range.StartNode == range.EndNode
! && range.StartNode.parentNode == range.StartBlockLimit
&& range.StartNode.getAttribute && range.StartNode.getAttribute( '_fck_bookmark' ) )
range = null ;
***************
*** 210,214 ****
break ;
}
!
if ( isLast )
break ;
--- 219,223 ----
break ;
}
!
if ( isLast )
break ;
***************
*** 272,276 ****
removePreviousBr = !splitInfo.WasStartOfBlock ;
removeLastBr = !splitInfo.WasEndOfBlock ;
- FCKDebug.Output( 'removePreviousBr=' + removePreviousBr + ',removeLastBr=' + removeLastBr ) ;
// Insert the new block into the DOM.
--- 281,284 ----
***************
*** 312,316 ****
// above block can be removed or changed, so we can rely on it for the
// next interation.
! this._NextNode = ( isLast || block == lastNode ) ? null : FCKDomTools.GetNextSourceNode( block, true, null, lastNode ) ;
return block ;
--- 320,325 ----
// above block can be removed or changed, so we can rely on it for the
// next interation.
! if ( !this._NextNode )
! this._NextNode = ( isLast || block == lastNode ) ? null : FCKDomTools.GetNextSourceNode( block, true, null, lastNode ) ;
return block ;
Index: fcktoolbarstylecombo.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fcktoolbarstylecombo.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fcktoolbarstylecombo.js 9 Feb 2008 12:53:57 -0000 1.5
--- fcktoolbarstylecombo.js 5 May 2008 00:35:23 -0000 1.6
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 77,84 ****
// Object type styles have no preview.
! var caption = style.GetType() == FCK_STYLE_OBJECT ?
! styleName :
FCKToolbarStyleCombo_BuildPreview( style, style.Label || styleName ) ;
!
var item = targetSpecialCombo.AddItem( styleName, caption ) ;
--- 77,84 ----
// Object type styles have no preview.
! var caption = style.GetType() == FCK_STYLE_OBJECT ?
! styleName :
FCKToolbarStyleCombo_BuildPreview( style, style.Label || styleName ) ;
!
var item = targetSpecialCombo.AddItem( styleName, caption ) ;
***************
*** 124,128 ****
// for that element only.
// - Select the styles that are active for the current selection.
!
// Clear the current selection.
targetSpecialCombo.DeselectAll() ;
--- 124,128 ----
// for that element only.
// - Select the styles that are active for the current selection.
!
// Clear the current selection.
targetSpecialCombo.DeselectAll() ;
***************
*** 131,137 ****
var path ;
var tagName ;
!
var selection = FCK.ToolbarSet.CurrentInstance.Selection ;
!
if ( selection.GetType() == 'Control' )
{
--- 131,137 ----
var path ;
var tagName ;
!
var selection = FCK.ToolbarSet.CurrentInstance.Selection ;
!
if ( selection.GetType() == 'Control' )
{
***************
*** 149,153 ****
var item = targetSpecialCombo.Items[i] ;
var style = item.Style ;
!
if ( ( tagName && style.Element == tagName ) || ( !tagName && style.GetType() != FCK_STYLE_OBJECT ) )
{
--- 149,153 ----
var item = targetSpecialCombo.Items[i] ;
var style = item.Style ;
!
if ( ( tagName && style.Element == tagName ) || ( !tagName && style.GetType() != FCK_STYLE_OBJECT ) )
{
***************
*** 162,175 ****
}
! function FCKToolbarStyleCombo_BuildPreview( style, caption )
{
var styleType = style.GetType() ;
var html = [] ;
!
if ( styleType == FCK_STYLE_BLOCK )
html.push( '<div class="BaseFont">' ) ;
!
var elementName = style.Element ;
!
// Avoid <bdo> in the preview.
if ( elementName == 'bdo' )
--- 162,175 ----
}
! function FCKToolbarStyleCombo_BuildPreview( style, caption )
{
var styleType = style.GetType() ;
var html = [] ;
!
if ( styleType == FCK_STYLE_BLOCK )
html.push( '<div class="BaseFont">' ) ;
!
var elementName = style.Element ;
!
// Avoid <bdo> in the preview.
if ( elementName == 'bdo' )
***************
*** 198,200 ****
return html.join( '' ) ;
! }
\ No newline at end of file
--- 198,200 ----
return html.join( '' ) ;
! }
Index: fckeditingarea.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckeditingarea.js,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** fckeditingarea.js 9 Feb 2008 12:53:56 -0000 1.4
--- fckeditingarea.js 5 May 2008 00:35:23 -0000 1.5
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 45,73 ****
// Remove all child nodes from the target.
! var oChild ;
! while( ( oChild = eTargetElement.firstChild ) ) // Only one "=".
! {
! // Set innerHTML = '' to avoid memory leak.
! if ( oChild.contentWindow )
! oChild.contentWindow.document.body.innerHTML = '' ;
!
! eTargetElement.removeChild( oChild ) ;
! }
if ( this.Mode == FCK_EDITMODE_WYSIWYG )
{
! // Create the editing area IFRAME.
! var oIFrame = this.IFrame = oTargetDocument.createElement( 'iframe' ) ;
!
! // Firefox will render the tables inside the body in Quirks mode if the
! // source of the iframe is set to javascript. see #515
! if ( !FCKBrowserInfo.IsGecko )
! oIFrame.src = 'javascript:void(0)' ;
!
! oIFrame.frameBorder = 0 ;
! oIFrame.width = oIFrame.height = '100%' ;
!
! // Append the new IFRAME to the target.
! eTargetElement.appendChild( oIFrame ) ;
// IE has a bug with the <base> tag... it must have a </base> closer,
--- 45,57 ----
// Remove all child nodes from the target.
! while( eTargetElement.firstChild )
! eTargetElement.removeChild( eTargetElement.firstChild ) ;
if ( this.Mode == FCK_EDITMODE_WYSIWYG )
{
! // For FF, document.domain must be set only when different, otherwhise
! // we'll strangely have "Permission denied" issues.
! if ( FCK_IS_CUSTOM_DOMAIN )
! html = '<script>document.domain="' + FCK_RUNTIME_DOMAIN + '";</script>' + html ;
// IE has a bug with the <base> tag... it must have a </base> closer,
***************
*** 105,108 ****
--- 89,124 ----
}
+ // Create the editing area IFRAME.
+ var oIFrame = this.IFrame = oTargetDocument.createElement( 'iframe' ) ;
+
+ // IE: Avoid JavaScript errors thrown by the editing are source (like tags events).
+ // See #1055.
+ var sOverrideError = '<script type="text/javascript" _fcktemp="true">window.onerror=function(){return true;};</script>' ;
+
+ oIFrame.frameBorder = 0 ;
+ oIFrame.width = oIFrame.height = '100%' ;
+
+ if ( FCK_IS_CUSTOM_DOMAIN && FCKBrowserInfo.IsIE )
+ {
+ window._FCKHtmlToLoad = sOverrideError + html ;
+ oIFrame.src = 'javascript:void( (function(){' +
+ 'document.open() ;' +
+ 'document.domain="' + document.domain + '" ;' +
+ 'document.write( window.parent._FCKHtmlToLoad );' +
+ 'document.close() ;' +
+ 'window.parent._FCKHtmlToLoad = null ;' +
+ '})() )' ;
+ }
+ else if ( !FCKBrowserInfo.IsGecko )
+ {
+ // Firefox will render the tables inside the body in Quirks mode if the
+ // source of the iframe is set to javascript. see #515
+ oIFrame.src = 'javascript:void(0)' ;
+ }
+
+ // Append the new IFRAME to the target. For IE, it must be done after
+ // setting the "src", to avoid the "secure/unsecure" message under HTTPS.
+ eTargetElement.appendChild( oIFrame ) ;
+
// Get the window and document objects used to interact with the newly created IFRAME.
this.Window = oIFrame.contentWindow ;
***************
*** 112,120 ****
// this.Window.onerror = function() { alert( 'Error!' ) ; return true ; }
! var oDoc = this.Document = this.Window.document ;
! oDoc.open() ;
! oDoc.write( html ) ;
! oDoc.close() ;
// Firefox 1.0.x is buggy... ohh yes... so let's do it two times and it
--- 128,142 ----
// this.Window.onerror = function() { alert( 'Error!' ) ; return true ; }
! if ( !FCK_IS_CUSTOM_DOMAIN || !FCKBrowserInfo.IsIE )
! {
! var oDoc = this.Window.document ;
! oDoc.open() ;
! oDoc.write( sOverrideError + html ) ;
! oDoc.close() ;
! }
!
! if ( FCKBrowserInfo.IsAIR )
! FCKAdobeAIR.EditingArea_Start( oDoc, html ) ;
// Firefox 1.0.x is buggy... ohh yes... so let's do it two times and it
***************
*** 126,139 ****
}
! this.Window._FCKEditingArea = this ;
!
! // FF 1.0.x is buggy... we must wait a lot to enable editing because
! // sometimes the content simply disappears, for example when pasting
! // "bla1!<img src='some_url'>!bla2" in the source and then switching
! // back to design.
! if ( FCKBrowserInfo.IsGecko10 )
! this.Window.setTimeout( FCKEditingArea_CompleteStart, 500 ) ;
else
! FCKEditingArea_CompleteStart.call( this.Window ) ;
}
else
--- 148,180 ----
}
! if ( oIFrame.readyState && oIFrame.readyState != 'completed' )
! {
! var editArea = this ;
! ( oIFrame.onreadystatechange = function()
! {
! if ( oIFrame.readyState == 'complete' )
! {
! oIFrame.onreadystatechange = null ;
! editArea.Window._FCKEditingArea = editArea ;
! FCKEditingArea_CompleteStart.call( editArea.Window ) ;
! }
! // It happened that IE changed the state to "complete" after the
! // "if" and before the "onreadystatechange" assignement, making we
! // lost the event call, so we do a manual call just to be sure.
! } )() ;
! }
else
! {
! this.Window._FCKEditingArea = this ;
!
! // FF 1.0.x is buggy... we must wait a lot to enable editing because
! // sometimes the content simply disappears, for example when pasting
! // "bla1!<img src='some_url'>!bla2" in the source and then switching
! // back to design.
! if ( FCKBrowserInfo.IsGecko10 )
! this.Window.setTimeout( FCKEditingArea_CompleteStart, 500 ) ;
! else
! FCKEditingArea_CompleteStart.call( this.Window ) ;
! }
}
else
***************
*** 142,150 ****
eTextarea.className = 'SourceField' ;
eTextarea.dir = 'ltr' ;
! FCKDomTools.SetElementStyles( eTextarea,
! {
! width : '100%',
! height : '100%',
! border : 'none',
resize : 'none',
outline : 'none'
--- 183,191 ----
eTextarea.className = 'SourceField' ;
eTextarea.dir = 'ltr' ;
! FCKDomTools.SetElementStyles( eTextarea,
! {
! width : '100%',
! height : '100%',
! border : 'none',
resize : 'none',
outline : 'none'
***************
*** 170,174 ****
var oEditorArea = this._FCKEditingArea ;
!
oEditorArea.MakeEditable() ;
--- 211,218 ----
var oEditorArea = this._FCKEditingArea ;
!
! // Save this reference to be re-used later.
! oEditorArea.Document = oEditorArea.Window.document ;
!
oEditorArea.MakeEditable() ;
***************
*** 214,218 ****
oDoc.execCommand( 'enableInlineTableEditing', false, !FCKConfig.DisableFFTableHandles ) ;
}
! catch (e)
{
// In Firefox if the iframe is initially hidden it can't be set to designMode and it raises an exception
--- 258,262 ----
oDoc.execCommand( 'enableInlineTableEditing', false, !FCKConfig.DisableFFTableHandles ) ;
}
! catch (e)
{
// In Firefox if the iframe is initially hidden it can't be set to designMode and it raises an exception
***************
*** 229,238 ****
{
var editingArea = evt.currentTarget.contentWindow._FCKEditingArea ;
!
// We want to run our function after the events no longer fire, so we can know that it's a stable situation
if ( editingArea._timer )
window.clearTimeout( editingArea._timer ) ;
! editingArea._timer = FCKTools.SetTimeout( FCKEditingArea_MakeEditableByMutation, 1000, editingArea ) ;
}
--- 273,282 ----
{
var editingArea = evt.currentTarget.contentWindow._FCKEditingArea ;
!
// We want to run our function after the events no longer fire, so we can know that it's a stable situation
if ( editingArea._timer )
window.clearTimeout( editingArea._timer ) ;
! editingArea._timer = FCKTools.SetTimeout( FCKEditingArea_MakeEditableByMutation, 1000, editingArea ) ;
}
***************
*** 256,269 ****
if ( this.Mode == FCK_EDITMODE_WYSIWYG )
{
- // The following check is important to avoid IE entering in a focus loop. Ref:
- // http://sourceforge.net/tracker/index.php?func=detail&aid=1567060&group_id=75348&atid=543653
- if ( FCKBrowserInfo.IsIE && this.Document.hasFocus() )
- this._EnsureFocusIE() ;
-
- this.Window.focus() ;
-
- // In IE it can happen that the document is in theory focused but the active element is outside it
if ( FCKBrowserInfo.IsIE )
! this._EnsureFocusIE() ;
}
else
--- 300,307 ----
if ( this.Mode == FCK_EDITMODE_WYSIWYG )
{
if ( FCKBrowserInfo.IsIE )
! this._FocusIE() ;
! else
! this.Window.focus() ;
}
else
***************
*** 279,287 ****
}
! FCKEditingArea.prototype._EnsureFocusIE = function()
{
! // In IE it can happen that the document is in theory focused but the active element is outside it
this.Document.body.setActive() ;
// Kludge for #141... yet more code to workaround IE bugs
var range = this.Document.selection.createRange() ;
--- 317,328 ----
}
! FCKEditingArea.prototype._FocusIE = function()
{
! // In IE it can happen that the document is in theory focused but the
! // active element is outside of it.
this.Document.body.setActive() ;
+ this.Window.focus() ;
+
// Kludge for #141... yet more code to workaround IE bugs
var range = this.Document.selection.createRange() ;
***************
*** 292,296 ****
// Only apply the fix when in a block, and the block is empty.
if ( parentNode.childNodes.length > 0 ||
! !( FCKListsLib.BlockElements[parentTag] ||
FCKListsLib.NonEmptyBlockElements[parentTag] ) )
{
--- 333,337 ----
// Only apply the fix when in a block, and the block is empty.
if ( parentNode.childNodes.length > 0 ||
! !( FCKListsLib.BlockElements[parentTag] ||
FCKListsLib.NonEmptyBlockElements[parentTag] ) )
{
***************
*** 298,309 ****
}
! range.moveEnd( "character", 1 ) ;
! range.select() ;
!
! if ( range.boundingWidth > 0 )
! {
! range.moveEnd( "character", -1 ) ;
! range.select() ;
! }
}
--- 339,347 ----
}
! // Force the selection to happen, in this way we guarantee the focus will
! // be there.
! range = new FCKDomRange( this.Window ) ;
! range.MoveToElementEditStart( parentNode ) ;
! range.Select() ;
}
Index: fckxml.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/classes/fckxml.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fckxml.js 9 Feb 2008 12:53:57 -0000 1.1
--- fckxml.js 5 May 2008 00:35:23 -0000 1.2
***************
*** 1,5 ****
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2007 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
--- 1,5 ----
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
! * Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
***************
*** 106,108 ****
return obj ;
! }
\ No newline at end of file
--- 106,108 ----
return obj ;
! }
More information about the geeklog-cvs
mailing list