[geeklog-cvs] Geeklog-1.x/public_html/fckeditor/editor/_source/internals fck.js, 1.7, 1.8 fck_contextmenu.js, 1.4, 1.5 fck_gecko.js, 1.2, 1.3 fck_ie.js, 1.2, 1.3 fckbrowserinfo.js, 1.7, 1.8 fckcommands.js, 1.7, 1.8 fckconfig.js, 1.6, 1.7 fckdebug.js, 1.6, 1.7 fckdialog.js, 1.7, 1.8 fckdocumentprocessor.js, 1.5, 1.6 fckdomtools.js, 1.2, 1.3 fcklanguagemanager.js, 1.6, 1.7 fckregexlib.js, 1.7, 1.8 fckselection_gecko.js, 1.6, 1.7 fckselection_ie.js, 1.6, 1.7 fcktablehandler.js, 1.7, 1.8 fcktoolbaritems.js, 1.7, 1.8 fcktools.js, 1.8, 1.9 fcktools_ie.js, 1.7, 1.8 fckxhtml.js, 1.8, 1.9 fckxhtml_gecko.js, 1.6, 1.7 fckxhtml_ie.js, 1.7, 1.8 fckdialog_gecko.js, 1.6, NONE fckdialog_ie.js, 1.5, NONE

Blaine Lang blaine at qs1489.pair.com
Sun Aug 10 12:46:29 EDT 2008


Update of /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals
In directory qs1489.pair.com:/tmp/cvs-serv4567/editor/_source/internals

Modified Files:
	fck.js fck_contextmenu.js fck_gecko.js fck_ie.js 
	fckbrowserinfo.js fckcommands.js fckconfig.js fckdebug.js 
	fckdialog.js fckdocumentprocessor.js fckdomtools.js 
	fcklanguagemanager.js fckregexlib.js fckselection_gecko.js 
	fckselection_ie.js fcktablehandler.js fcktoolbaritems.js 
	fcktools.js fcktools_ie.js fckxhtml.js fckxhtml_gecko.js 
	fckxhtml_ie.js 
Removed Files:
	fckdialog_gecko.js fckdialog_ie.js 
Log Message:
Upgrade to FCKeditor ver 2.6.3

Index: fckconfig.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fckconfig.js,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** fckconfig.js	5 May 2008 00:35:24 -0000	1.6
--- fckconfig.js	10 Aug 2008 16:46:27 -0000	1.7
***************
*** 43,53 ****
  
  	FCKConfig.BasePath = sFullProtocol + FCKConfig.BasePath.substring( 0, FCKConfig.BasePath.lastIndexOf( '/' ) + 1) ;
- 	FCKConfig.FullBasePath = FCKConfig.BasePath ;
  }
  else
! {
! 	FCKConfig.BasePath = document.location.pathname.substring( 0, document.location.pathname.lastIndexOf( '/' ) + 1) ;
! 	FCKConfig.FullBasePath = document.location.protocol + '//' + document.location.host + FCKConfig.BasePath ;
! }
  
  FCKConfig.EditorPath = FCKConfig.BasePath.replace( /editor\/$/, '' ) ;
--- 43,52 ----
  
  	FCKConfig.BasePath = sFullProtocol + FCKConfig.BasePath.substring( 0, FCKConfig.BasePath.lastIndexOf( '/' ) + 1) ;
  }
  else
! 	FCKConfig.BasePath = document.location.protocol + '//' + document.location.host +
! 		document.location.pathname.substring( 0, document.location.pathname.lastIndexOf( '/' ) + 1) ;
! 
! FCKConfig.FullBasePath = FCKConfig.BasePath ;
  
  FCKConfig.EditorPath = FCKConfig.BasePath.replace( /editor\/$/, '' ) ;

Index: fcktools_ie.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fcktools_ie.js,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** fcktools_ie.js	5 May 2008 00:35:24 -0000	1.7
--- fcktools_ie.js	10 Aug 2008 16:46:27 -0000	1.8
***************
*** 76,80 ****
  		case 'XmlHttp' :
  			// Try the native XMLHttpRequest introduced with IE7.
! 			try { return new XMLHttpRequest() ; } catch (e) {}
  
  			aObjs = [ 'MSXML2.XmlHttp', 'Microsoft.XmlHttp' ] ;
--- 76,81 ----
  		case 'XmlHttp' :
  			// Try the native XMLHttpRequest introduced with IE7.
! 			if ( document.location.protocol != 'file:' )
! 				try { return new XMLHttpRequest() ; } catch (e) {}
  
  			aObjs = [ 'MSXML2.XmlHttp', 'Microsoft.XmlHttp' ] ;

--- fckdialog_gecko.js DELETED ---

Index: fckbrowserinfo.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fckbrowserinfo.js,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** fckbrowserinfo.js	5 May 2008 00:35:24 -0000	1.7
--- fckbrowserinfo.js	10 Aug 2008 16:46:27 -0000	1.8
***************
*** 29,33 ****
  	IsIE7		: /*@cc_on!@*/false && ( parseInt( s.match( /msie (\d+)/ )[1], 10 ) >= 7 ),
  	IsIE6		: /*@cc_on!@*/false && ( parseInt( s.match( /msie (\d+)/ )[1], 10 ) >= 6 ),
- 	IsGecko		: s.Contains('gecko/'),
  	IsSafari	: s.Contains(' applewebkit/'),		// Read "IsWebKit"
  	IsOpera		: !!window.opera,
--- 29,32 ----
***************
*** 39,47 ****
  (function( browserInfo )
  {
  	browserInfo.IsGeckoLike = ( browserInfo.IsGecko || browserInfo.IsSafari || browserInfo.IsOpera ) ;
  
  	if ( browserInfo.IsGecko )
  	{
! 		var geckoVersion = s.match( /gecko\/(\d+)/ )[1] ;
  
  		// Actually "10" refers to Gecko versions before Firefox 1.5, when
--- 38,48 ----
  (function( browserInfo )
  {
+ 	browserInfo.IsGecko = ( navigator.product == 'Gecko' ) && !browserInfo.IsSafari && !browserInfo.IsOpera ;
  	browserInfo.IsGeckoLike = ( browserInfo.IsGecko || browserInfo.IsSafari || browserInfo.IsOpera ) ;
  
  	if ( browserInfo.IsGecko )
  	{
! 		var geckoMatch = s.match( /rv:(\d+\.\d+)/ ) ;
! 		var geckoVersion = geckoMatch && parseFloat( geckoMatch[1] ) ;
  
  		// Actually "10" refers to Gecko versions before Firefox 1.5, when
***************
*** 52,61 ****
  		// be 1.7 (we are assuming that rv < 1.7 will not have build > 20051111).
  
! 		// TODO: Future versions may consider the rv number only, but it is
! 		// still to check that all Gecko based browser present the rv number.
! 		browserInfo.IsGecko10 = ( ( geckoVersion < 20051111 ) || ( /rv:1\.7/.test(s) ) ) ;
! 		browserInfo.IsGecko19 = /rv:1\.9/.test(s) ;
  	}
- 	else
- 		browserInfo.IsGecko10 = false ;
  })(FCKBrowserInfo) ;
--- 53,61 ----
  		// be 1.7 (we are assuming that rv < 1.7 will not have build > 20051111).
  
! 		if ( geckoVersion )
! 		{
! 			browserInfo.IsGecko10 = ( geckoVersion < 1.8 ) ;
! 			browserInfo.IsGecko19 = ( geckoVersion > 1.8 ) ;
! 		}
  	}
  })(FCKBrowserInfo) ;

Index: fckdialog.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fckdialog.js,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** fckdialog.js	5 May 2008 00:35:24 -0000	1.7
--- fckdialog.js	10 Aug 2008 16:46:27 -0000	1.8
***************
*** 76,88 ****
  	}
  
- 	var resetStyles = function( element )
- 	{
- 		element.style.cssText = 'margin:0;' +
- 			'padding:0;' +
- 			'border:0;' +
- 			'background-color:transparent;' +
- 			'background-image:none;' ;
- 	}
- 
  	return {
  		/**
--- 76,79 ----
***************
*** 108,112 ****
  			// Calculate the dialog position, centering it on the screen.
  			var viewSize = FCKTools.GetViewPaneSize( topWindow ) ;
! 			var scrollPosition = FCKTools.GetScrollPosition( topWindow ) ;
  			var iTop  = Math.max( scrollPosition.Y + ( viewSize.Height - height - 20 ) / 2, 0 ) ;
  			var iLeft = Math.max( scrollPosition.X + ( viewSize.Width - width - 20 )  / 2, 0 ) ;
--- 99,106 ----
  			// Calculate the dialog position, centering it on the screen.
  			var viewSize = FCKTools.GetViewPaneSize( topWindow ) ;
! 			var scrollPosition = { 'X' : 0, 'Y' : 0 } ;
! 			var useAbsolutePosition = FCKBrowserInfo.IsIE && ( !FCKBrowserInfo.IsIE7 || !FCKTools.IsStrictMode( topWindow.document ) ) ;
! 			if ( useAbsolutePosition )
! 				scrollPosition = FCKTools.GetScrollPosition( topWindow ) ;
  			var iTop  = Math.max( scrollPosition.Y + ( viewSize.Height - height - 20 ) / 2, 0 ) ;
  			var iLeft = Math.max( scrollPosition.X + ( viewSize.Width - width - 20 )  / 2, 0 ) ;
***************
*** 114,118 ****
  			// Setup the IFRAME that will hold the dialog.
  			var dialog = topDocument.createElement( 'iframe' ) ;
! 			resetStyles( dialog ) ;
  			dialog.src = FCKConfig.BasePath + 'fckdialog.html' ;
  
--- 108,112 ----
  			// Setup the IFRAME that will hold the dialog.
  			var dialog = topDocument.createElement( 'iframe' ) ;
! 			FCKTools.ResetStyles( dialog ) ;
  			dialog.src = FCKConfig.BasePath + 'fckdialog.html' ;
  
***************
*** 124,128 ****
  			FCKDomTools.SetElementStyles( dialog,
  					{
! 						'position'	: 'absolute',
  						'top'		: iTop + 'px',
  						'left'		: iLeft + 'px',
--- 118,122 ----
  			FCKDomTools.SetElementStyles( dialog,
  					{
! 						'position'	: ( useAbsolutePosition ) ? 'absolute' : 'fixed',
  						'top'		: iTop + 'px',
  						'left'		: iLeft + 'px',
***************
*** 180,184 ****
  			// Setup the DIV that will be used to cover.
  			cover = topDocument.createElement( 'div' ) ;
! 			resetStyles( cover ) ;
  			FCKDomTools.SetElementStyles( cover,
  				{
--- 174,178 ----
  			// Setup the DIV that will be used to cover.
  			cover = topDocument.createElement( 'div' ) ;
! 			FCKTools.ResetStyles( cover ) ;
  			FCKDomTools.SetElementStyles( cover,
  				{
***************
*** 196,200 ****
  			{
  				var iframe = topDocument.createElement( 'iframe' ) ;
! 				resetStyles( iframe ) ;
  				iframe.hideFocus = true ;
  				iframe.frameBorder = 0 ;
--- 190,194 ----
  			{
  				var iframe = topDocument.createElement( 'iframe' ) ;
! 				FCKTools.ResetStyles( iframe ) ;
  				iframe.hideFocus = true ;
  				iframe.frameBorder = 0 ;
***************
*** 219,222 ****
--- 213,222 ----
  
  			FCKFocusManager.Lock() ;
+ 
+ 			// Prevent the user from refocusing the disabled
+ 			// editing window by pressing Tab. (Bug #2065)
+ 			var el = FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'frameElement' ) ;
+ 			el._fck_originalTabIndex = el.tabIndex ;
+ 			el.tabIndex = -1 ;
  		},
  
***************
*** 225,228 ****
--- 225,233 ----
  			FCKDomTools.RemoveNode( cover ) ;
  			FCKFocusManager.Unlock() ;
+ 
+ 			// Revert the tab index hack. (Bug #2065)
+ 			var el = FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'frameElement' ) ;
+ 			el.tabIndex = el._fck_originalTabIndex ;
+ 			FCKDomTools.ClearElementJSProperty( el, '_fck_originalTabIndex' ) ;
  		},
  

Index: fckxhtml_ie.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fckxhtml_ie.js,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** fckxhtml_ie.js	5 May 2008 00:35:24 -0000	1.7
--- fckxhtml_ie.js	10 Aug 2008 16:46:27 -0000	1.8
***************
*** 30,34 ****
  FCKXHtml._AppendAttributes = function( xmlNode, htmlNode, node, nodeName )
  {
! 	var aAttributes = htmlNode.attributes ;
  
  	for ( var n = 0 ; n < aAttributes.length ; n++ )
--- 30,35 ----
  FCKXHtml._AppendAttributes = function( xmlNode, htmlNode, node, nodeName )
  {
! 	var aAttributes = htmlNode.attributes,
! 		bHasStyle ;
  
  	for ( var n = 0 ; n < aAttributes.length ; n++ )
***************
*** 48,54 ****
  			else if ( sAttName == 'style' )
  			{
! 				var data = FCKTools.ProtectFormStyles( htmlNode ) ;
! 				sAttValue = htmlNode.style.cssText.replace( FCKRegexLib.StyleProperties, FCKTools.ToLowerCase ) ;
! 				FCKTools.RestoreFormStyles( htmlNode, data ) ;
  			}
  			// There are two cases when the oAttribute.nodeValue must be used:
--- 49,55 ----
  			else if ( sAttName == 'style' )
  			{
! 				// Just mark it to do it later in this function.
! 				bHasStyle = true ;
! 				continue ;
  			}
  			// There are two cases when the oAttribute.nodeValue must be used:
***************
*** 81,84 ****
--- 82,94 ----
  		}
  	}
+ 
+ 	// IE loses the style attribute in JavaScript-created elements tags. (#2390)
+ 	if ( bHasStyle || htmlNode.style.cssText.length > 0 )
+ 	{
+ 		var data = FCKTools.ProtectFormStyles( htmlNode ) ;
+ 		var sStyleValue = htmlNode.style.cssText.replace( FCKRegexLib.StyleProperties, FCKTools.ToLowerCase ) ;
+ 		FCKTools.RestoreFormStyles( htmlNode, data ) ;
+ 		this._AppendAttribute( node, 'style', sStyleValue ) ;
+ 	}
  }
  

Index: fckxhtml_gecko.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fckxhtml_gecko.js,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** fckxhtml_gecko.js	5 May 2008 00:35:24 -0000	1.6
--- fckxhtml_gecko.js	10 Aug 2008 16:46:27 -0000	1.7
***************
*** 100,101 ****
--- 100,114 ----
  	}
  }
+ 
+ if ( FCKBrowserInfo.IsGecko )
+ {
+ 	// #2162, some Firefox extensions might add references to internal links
+ 	FCKXHtml.TagProcessors['link'] = function( node, htmlNode )
+ 	{
+ 		if ( htmlNode.href.substr(0, 9).toLowerCase() == 'chrome://' )
+ 			return false ;
+ 
+ 		return node ;
+ 	}
+ 
+ }

Index: fckdebug.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fckdebug.js,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** fckdebug.js	5 May 2008 00:35:24 -0000	1.6
--- fckdebug.js	10 Aug 2008 16:46:27 -0000	1.7
***************
*** 22,56 ****
   */
  
! var FCKDebug = new Object() ;
  
! FCKDebug._GetWindow = function()
  {
! 	if ( !this.DebugWindow || this.DebugWindow.closed )
! 		this.DebugWindow = window.open( FCKConfig.BasePath + 'fckdebug.html', 'FCKeditorDebug', 'menubar=no,scrollbars=yes,resizable=yes,location=no,toolbar=no,width=600,height=500', true ) ;
! 
! 	return this.DebugWindow ;
! }
  
! FCKDebug.Output = function( message, color, noParse )
! {
! 	if ( ! FCKConfig.Debug )
! 		return ;
  
! 	try
  	{
! 		this._GetWindow().Output( message, color ) ;
! 	}
! 	catch ( e ) {}	 // Ignore errors
! }
  
! FCKDebug.OutputObject = function( anyObject, color )
! {
! 	if ( ! FCKConfig.Debug )
! 		return ;
  
! 	try
  	{
! 		this._GetWindow().OutputObject( anyObject, color ) ;
  	}
! 	catch ( e ) {}	 // Ignore errors
! }
--- 22,59 ----
   */
  
! // Public function defined here must be declared in fckdebug_empty.js.
  
! var FCKDebug =
  {
! 	Output : function( message, color, noParse )
! 	{
! 		if ( ! FCKConfig.Debug )
! 			return ;
  
! 		try
! 		{
! 			this._GetWindow().Output( message, color ) ;
! 		}
! 		catch ( e ) {}	 // Ignore errors
! 	},
  
! 	OutputObject : function( anyObject, color )
  	{
! 		if ( ! FCKConfig.Debug )
! 			return ;
  
! 		try
! 		{
! 			this._GetWindow().OutputObject( anyObject, color ) ;
! 		}
! 		catch ( e ) {}	 // Ignore errors
! 	},
  
! 	_GetWindow : function()
  	{
! 		if ( !this.DebugWindow || this.DebugWindow.closed )
! 			this.DebugWindow = window.open( FCKConfig.BasePath + 'fckdebug.html', 'FCKeditorDebug', 'menubar=no,scrollbars=yes,resizable=yes,location=no,toolbar=no,width=600,height=500', true ) ;
! 
! 		return this.DebugWindow ;
  	}
! } ;

Index: fckcommands.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fckcommands.js,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** fckcommands.js	5 May 2008 00:35:24 -0000	1.7
--- fckcommands.js	10 Aug 2008 16:46:27 -0000	1.8
***************
*** 52,55 ****
--- 52,56 ----
  		case 'Link'			: oCommand = new FCKDialogCommand( 'Link'		, FCKLang.DlgLnkWindowTitle		, 'dialog/fck_link.html'		, 400, 300 ) ; break ;
  		case 'Unlink'		: oCommand = new FCKUnlinkCommand() ; break ;
+ 		case 'VisitLink'	: oCommand = new FCKVisitLinkCommand() ; break ;
  		case 'Anchor'		: oCommand = new FCKDialogCommand( 'Anchor'		, FCKLang.DlgAnchorTitle		, 'dialog/fck_anchor.html'		, 370, 160 ) ; break ;
  		case 'AnchorDelete'	: oCommand = new FCKAnchorDeleteCommand() ; break ;
***************
*** 80,83 ****
--- 81,85 ----
  		case 'PageBreak'	: oCommand = new FCKPageBreakCommand() ; break ;
  		case 'Rule'			: oCommand = new FCKRuleCommand() ; break ;
+ 		case 'Nbsp'			: oCommand = new FCKNbsp() ; break ;
  
  		case 'TextColor'	: oCommand = new FCKTextColorCommand('ForeColor') ; break ;
***************
*** 95,98 ****
--- 97,103 ----
  		case 'Outdent'	: oCommand = new FCKIndentCommand( 'outdent', FCKConfig.IndentLength * -1 ) ; break ;
  		case 'Blockquote'	: oCommand = new FCKBlockQuoteCommand() ; break ;
+ 		case 'CreateDiv'	: oCommand = new FCKDialogCommand( 'CreateDiv', FCKLang.CreateDiv, 'dialog/fck_div.html', 380, 210, null, null, true ) ; break ;
+ 		case 'EditDiv'		: oCommand = new FCKDialogCommand( 'EditDiv', FCKLang.EditDiv, 'dialog/fck_div.html', 380, 210, null, null, false ) ; break ;
+ 		case 'DeleteDiv'	: oCommand = new FCKDeleteDivCommand() ; break ;
  
  		case 'TableInsertRowAfter'		: oCommand = new FCKTableCommand('TableInsertRowAfter') ; break ;

Index: fcktools.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fcktools.js,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** fcktools.js	5 May 2008 00:35:24 -0000	1.8
--- fcktools.js	10 Aug 2008 16:46:27 -0000	1.9
***************
*** 82,86 ****
  	{
  		// Test if the passed argument is an URL.
! 		if ( /[\\\/\.]\w*$/.test( cssFileOrArrayOrDef ) )
  		{
  			// The string may have several URLs separated by comma.
--- 82,86 ----
  	{
  		// Test if the passed argument is an URL.
! 		if ( /[\\\/\.][^{}]*$/.test( cssFileOrArrayOrDef ) )
  		{
  			// The string may have several URLs separated by comma.
***************
*** 127,131 ****
  		{
  			// Test if the passed argument is an URL.
! 			if ( /[\\\/\.]\w*$/.test( cssFileOrArrayOrDef ) )
  			{
  				// The string may have several URLs separated by comma.
--- 127,131 ----
  		{
  			// Test if the passed argument is an URL.
! 			if ( /[\\\/\.][^{}]*$/.test( cssFileOrArrayOrDef ) )
  			{
  				// The string may have several URLs separated by comma.
***************
*** 739,740 ****
--- 739,749 ----
  	return "javascript: void(0);" ;		// All other browsers.
  }
+ 
+ FCKTools.ResetStyles = function( element )
+ {
+ 	element.style.cssText = 'margin:0;' +
+ 		'padding:0;' +
+ 		'border:0;' +
+ 		'background-color:transparent;' +
+ 		'background-image:none;' ;
+ }

Index: fckregexlib.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fckregexlib.js,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** fckregexlib.js	5 May 2008 00:35:24 -0000	1.7
--- fckregexlib.js	10 Aug 2008 16:46:27 -0000	1.8
***************
*** 79,82 ****
--- 79,83 ----
  Html4DocType	: /HTML 4\.0 Transitional/i ,
  DocTypeTag		: /<!DOCTYPE[^>]*>/i ,
+ HtmlDocType		: /DTD HTML/ ,
  
  // These regex are used to save the original event attributes in the HTML.

Index: fckdomtools.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fckdomtools.js,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** fckdomtools.js	5 May 2008 00:35:24 -0000	1.2
--- fckdomtools.js	10 Aug 2008 16:46:27 -0000	1.3
***************
*** 697,701 ****
  	SetElementMarker : function ( markerObj, element, attrName, value)
  	{
! 		var id = String( parseInt( Math.random() * 0xfffffff, 10 ) ) ;
  		element._FCKMarkerId = id ;
  		element[attrName] = value ;
--- 697,701 ----
  	SetElementMarker : function ( markerObj, element, attrName, value)
  	{
! 		var id = String( parseInt( Math.random() * 0xffffffff, 10 ) ) ;
  		element._FCKMarkerId = id ;
  		element[attrName] = value ;
***************
*** 973,978 ****
  
  	/**
! 	 * Current implementation for ScrollIntoView (due to #1462). We don't have
! 	 * a complete implementation here, just the things that fit our needs.
  	 */
  	ScrollIntoView : function( element, alignTop )
--- 973,979 ----
  
  	/**
! 	 * Current implementation for ScrollIntoView (due to #1462 and #2279). We
! 	 * don't have a complete implementation here, just the things that fit our
! 	 * needs.
  	 */
  	ScrollIntoView : function( element, alignTop )
***************
*** 989,1008 ****
  		if ( alignTop === false )
  		{
! 			offset += element.offsetHeight ;
  
  			// Consider the margin in the scroll, which is ok for our current
  			// needs, but needs investigation if we will be using this function
  			// in other places.
! 			offset += parseInt( this.GetCurrentElementStyle( element, 'marginBottom' ) || 0, 10 ) ;
  		}
  
  		// Appends the offsets for the entire element hierarchy.
! 		offset += element.offsetTop ;
! 		while ( ( element = element.offsetParent ) )
! 			offset += element.offsetTop || 0 ;
  
  		// Scroll the window to the desired position, if not already visible.
  		var currentScroll = FCKTools.GetScrollPosition( window ).Y ;
! 		if ( offset > 0 && offset > currentScroll )
  			window.scrollTo( 0, offset ) ;
  	},
--- 990,1008 ----
  		if ( alignTop === false )
  		{
! 			offset += element.offsetHeight || 0 ;
  
  			// Consider the margin in the scroll, which is ok for our current
  			// needs, but needs investigation if we will be using this function
  			// in other places.
! 			offset += parseInt( this.GetCurrentElementStyle( element, 'marginBottom' ) || 0, 10 ) || 0 ;
  		}
  
  		// Appends the offsets for the entire element hierarchy.
! 		var elementPosition = FCKTools.GetDocumentPosition( window, element ) ;
! 		offset += elementPosition.y ;
  
  		// Scroll the window to the desired position, if not already visible.
  		var currentScroll = FCKTools.GetScrollPosition( window ).Y ;
! 		if ( offset > 0 && ( offset > currentScroll || offset < currentScroll - windowHeight ) )
  			window.scrollTo( 0, offset ) ;
  	},
***************
*** 1021,1024 ****
--- 1021,1057 ----
  		// In the DTD # == text node.
  		return ( childDTD['#'] && !FCKListsLib.NonEditableElements[ nodeName ] ) ;
+ 	},
+ 
+ 	GetSelectedDivContainers : function()
+ 	{
+ 		var currentBlocks = [] ;
+ 		var range = new FCKDomRange( FCK.EditorWindow ) ;
+ 		range.MoveToSelection() ;
+ 
+ 		var startNode = range.GetTouchedStartNode() ;
+ 		var endNode = range.GetTouchedEndNode() ;
+ 		var currentNode = startNode ;
+ 
+ 		if ( startNode == endNode )
+ 		{
+ 			while ( endNode.nodeType == 1 && endNode.lastChild )
+ 				endNode = endNode.lastChild ;
+ 			endNode = FCKDomTools.GetNextSourceNode( endNode ) ;
+ 		}
+ 
+ 		while ( currentNode && currentNode != endNode )
+ 		{
+ 			if ( currentNode.nodeType != 3 || !/^[ \t\n]*$/.test( currentNode.nodeValue ) )
+ 			{
+ 				var path = new FCKElementPath( currentNode ) ;
+ 				var blockLimit = path.BlockLimit ;
+ 				if ( blockLimit && blockLimit.nodeName.IEquals( 'div' ) && currentBlocks.IndexOf( blockLimit ) == -1 )
+ 					currentBlocks.push( blockLimit ) ;
+ 			}
+ 
+ 			currentNode = FCKDomTools.GetNextSourceNode( currentNode ) ;
+ 		}
+ 
+ 		return currentBlocks ;
  	}
  } ;

Index: fck.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fck.js,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** fck.js	5 May 2008 00:35:24 -0000	1.7
--- fck.js	10 Aug 2008 16:46:27 -0000	1.8
***************
*** 199,202 ****
--- 199,209 ----
  					if ( oNewBlock || oNode.nodeValue.Trim().length > 0 )
  						bMoveNode = true ;
+ 					break;
+ 
+ 				// Comment Node
+ 				case 8 :
+ 					if ( oNewBlock )
+ 						bMoveNode = true ;
+ 					break;
  			}
  
***************
*** 403,406 ****
--- 410,415 ----
  		}
  
+ 		FCKTempBin.Reset();
+ 
  		if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG )
  		{
***************
*** 623,627 ****
  		var sHtml ;
  
! 		// Update the HTML in the view output to show.
  		if ( bIsWysiwyg )
  		{
--- 632,637 ----
  		var sHtml ;
  
! 		// Update the HTML in the view output to show, also update
! 		// FCKTempBin for IE to avoid #2263.
  		if ( bIsWysiwyg )
  		{
***************
*** 632,635 ****
--- 642,648 ----
  			sHtml = FCK.GetXHTML( FCKConfig.FormatSource ) ;
  
+ 			if ( FCKBrowserInfo.IsIE )
+ 				FCKTempBin.ToHtml() ;
+ 
  			if ( sHtml == null )
  				return false ;
***************
*** 665,671 ****
  		var range = new FCKDomRange( this.EditorWindow ) ;
  
  		if ( FCKListsLib.BlockElements[ elementName ] != null )
  		{
! 			range.SplitBlock() ;
  			range.InsertNode( element ) ;
  
--- 678,697 ----
  		var range = new FCKDomRange( this.EditorWindow ) ;
  
+ 		// Move to the selection and delete it.
+ 		range.MoveToSelection() ;
+ 		range.DeleteContents() ;
+ 
  		if ( FCKListsLib.BlockElements[ elementName ] != null )
  		{
! 			if ( range.StartBlock )
! 			{
! 				if ( range.CheckStartOfBlock() )
! 					range.MoveToPosition( range.StartBlock, 3 ) ;
! 				else if ( range.CheckEndOfBlock() )
! 					range.MoveToPosition( range.StartBlock, 4 ) ;
! 				else
! 					range.SplitBlock() ;
! 			}
! 
  			range.InsertNode( element ) ;
  
***************
*** 688,703 ****
  				range.MoveToPosition( element, 4 ) ;
  
! 			if ( FCKBrowserInfo.IsGecko )
  			{
  				if ( next )
! 					next.scrollIntoView( false ) ;
! 				element.scrollIntoView( false ) ;
  			}
  		}
  		else
  		{
! 			// Delete the current selection and insert the node.
! 			range.MoveToSelection() ;
! 			range.DeleteContents() ;
  			range.InsertNode( element ) ;
  
--- 714,727 ----
  				range.MoveToPosition( element, 4 ) ;
  
! 			if ( FCKBrowserInfo.IsGeckoLike )
  			{
  				if ( next )
! 					FCKDomTools.ScrollIntoView( next, false );
! 				FCKDomTools.ScrollIntoView( element, false );
  			}
  		}
  		else
  		{
! 			// Insert the node.
  			range.InsertNode( element ) ;
  
***************
*** 888,891 ****
--- 912,923 ----
  					&& FCK.EditorDocument.body.firstChild == paddingNode )
  			{
+ 				/*
+ 				 * Bug #1764: Don't move the selection if the
+ 				 * current selection isn't in the editor
+ 				 * document.
+ 				 */
+ 				if ( FCKSelection._GetSelectionDocument( FCK.EditorDocument.selection ) != FCK.EditorDocument )
+ 					return ;
+ 
  				var range = FCK.EditorDocument.body.createTextRange() ;
  				var clearContents = false ;
***************
*** 910,913 ****
--- 942,948 ----
  	FCK.EditorDocument	= FCK.EditingArea.Document ;
  
+ 	if ( FCKBrowserInfo.IsIE )
+ 		FCKTempBin.ToElements() ;
+ 
  	FCK.InitializeBehaviors() ;
  
***************
*** 1062,1065 ****
--- 1097,1122 ----
  			this.Elements[ i++ ] = null ;
  		this.Elements.length = 0 ;
+ 	},
+ 
+ 	ToHtml : function()
+ 	{
+ 		for ( var i = 0 ; i < this.Elements.length ; i++ )
+ 		{
+ 			this.Elements[i] = '<div> ' + this.Elements[i].outerHTML + '</div>' ;
+ 			this.Elements[i].isHtml = true ;
+ 		}
+ 	},
+ 
+ 	ToElements : function()
+ 	{
+ 		var node = FCK.EditorDocument.createElement( 'div' ) ;
+ 		for ( var i = 0 ; i < this.Elements.length ; i++ )
+ 		{
+ 			if ( this.Elements[i].isHtml )
+ 			{
+ 				node.innerHTML = this.Elements[i] ;
+ 				this.Elements[i] = node.firstChild.removeChild( node.firstChild.lastChild ) ;
+ 			}
+ 		}
  	}
  } ;
***************
*** 1174,1175 ****
--- 1231,1252 ----
  	}
  }
+ 
+ /*
+  * #1633 : Protect the editor iframe from external styles.
+  * Notice that we can't use FCKTools.ResetStyles here since FCKTools isn't
+  * loaded yet.
+  */
+ (function()
+ {
+ 	var el = window.frameElement ;
+ 	var width = el.width ;
+ 	var height = el.height ;
+ 	if ( /^\d+$/.test( width ) ) width += 'px' ;
+ 	if ( /^\d+$/.test( height ) ) height += 'px' ;
+ 	var style = el.style ;
+ 	style.border = style.padding = style.margin = 0 ;
+ 	style.backgroundColor = 'transparent';
+ 	style.backgroundImage = 'none';
+ 	style.width = width ;
+ 	style.height = height ;
+ })() ;

Index: fcktoolbaritems.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fcktoolbaritems.js,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** fcktoolbaritems.js	5 May 2008 00:35:24 -0000	1.7
--- fcktoolbaritems.js	10 Aug 2008 16:46:27 -0000	1.8
***************
*** 72,75 ****
--- 72,76 ----
  		case 'Indent'			: oItem = new FCKToolbarButton( 'Indent'	, FCKLang.IncreaseIndent, null, null, false, true, 29 ) ; break ;
  		case 'Blockquote'			: oItem = new FCKToolbarButton( 'Blockquote'	, FCKLang.Blockquote, null, null, false, true, 73 ) ; break ;
+ 		case 'CreateDiv'			: oItem = new FCKToolbarButton( 'CreateDiv'	, FCKLang.CreateDiv, null, null, false, true, 74 ) ; break ;
  
  		case 'Link'				: oItem = new FCKToolbarButton( 'Link'		, FCKLang.InsertLinkLbl, FCKLang.InsertLink, null, false, true, 34 ) ; break ;

Index: fcktablehandler.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fcktablehandler.js,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** fcktablehandler.js	5 May 2008 00:35:24 -0000	1.7
--- fcktablehandler.js	10 Aug 2008 16:46:27 -0000	1.8
***************
*** 551,555 ****
  		var newCellRowIndex = currentRowIndex + 1 ;
  		var newRow = FCK.EditorDocument.createElement( 'tr' ) ;
! 		currentCell.parentNode.parentNode.insertBefore( newRow, currentCell.parentNode.parentNode.rows[newCellRowIndex] ) ;
  
  		// 2. +1 to rowSpan for all cells crossing currentCell's row.
--- 551,559 ----
  		var newCellRowIndex = currentRowIndex + 1 ;
  		var newRow = FCK.EditorDocument.createElement( 'tr' ) ;
! 		var tBody = currentCell.parentNode.parentNode ;
! 		if ( tBody.rows.length > newCellRowIndex )
! 			tBody.insertBefore( newRow, tBody.rows[newCellRowIndex] ) ;
! 		else
! 			tBody.appendChild( newRow ) ;
  
  		// 2. +1 to rowSpan for all cells crossing currentCell's row.
***************
*** 678,681 ****
--- 682,690 ----
  FCKTableHandler._InstallTableMap = function( tableMap, table )
  {
+ 	// Workaround for #1917 : MSIE will always report a cell's rowSpan as 1 as long
+ 	// as the cell is not attached to a row. So we'll need an alternative attribute
+ 	// for storing the calculated rowSpan in IE.
+ 	var rowSpanAttr = FCKBrowserInfo.IsIE ? "_fckrowspan" : "rowSpan" ;
+ 
  	// Clear the table of all rows first.
  	while ( table.rows.length > 0 )
***************
*** 693,697 ****
  			if ( cell.parentNode )
  				cell.parentNode.removeChild( cell ) ;
! 			cell.colSpan = cell.rowSpan = 1 ;
  		}
  	}
--- 702,706 ----
  			if ( cell.parentNode )
  				cell.parentNode.removeChild( cell ) ;
! 			cell.colSpan = cell[rowSpanAttr] = 1 ;
  		}
  	}
***************
*** 728,732 ****
  				continue ;
  			if ( tableMap[j-1] && tableMap[j-1][i] == cell )
! 				cell.rowSpan++ ;
  			if ( ! tableMap[j+1] || tableMap[j+1][i] != cell )
  				cell._rowScanned = true ;
--- 737,741 ----
  				continue ;
  			if ( tableMap[j-1] && tableMap[j-1][i] == cell )
! 				cell[rowSpanAttr]++ ;
  			if ( ! tableMap[j+1] || tableMap[j+1][i] != cell )
  				cell._rowScanned = true ;
***************
*** 766,769 ****
--- 775,783 ----
  			}
  			rowObj.appendChild( cell ) ;
+ 			if ( rowSpanAttr != 'rowSpan' )
+ 			{
+ 				cell.rowSpan = cell[rowSpanAttr] ;
+ 				cell.removeAttribute( rowSpanAttr ) ;
+ 			}
  			j += cell.colSpan ;
  			if ( cell.colSpan == 1 )

Index: fckselection_ie.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fckselection_ie.js,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** fckselection_ie.js	5 May 2008 00:35:24 -0000	1.6
--- fckselection_ie.js	10 Aug 2008 16:46:27 -0000	1.7
***************
*** 148,152 ****
  	while ( oContainer )
  	{
! 		if ( oContainer.tagName == nodeTagName ) return true ;
  		oContainer = oContainer.parentNode ;
  	}
--- 148,152 ----
  	while ( oContainer )
  	{
! 		if ( oContainer.nodeName.IEquals( nodeTagName ) ) return true ;
  		oContainer = oContainer.parentNode ;
  	}
***************
*** 210,217 ****
  }
  
! FCKSelection.Save = function()
  {
  	// Ensures the editor has the selection focus. (#1801)
! 	FCK.Focus() ;
  
  	var editorDocument = FCK.EditorDocument ;
--- 210,218 ----
  }
  
! FCKSelection.Save = function( noFocus )
  {
  	// Ensures the editor has the selection focus. (#1801)
! 	if ( !noFocus )
! 		FCK.Focus() ;
  
  	var editorDocument = FCK.EditorDocument ;
***************
*** 260,265 ****
  		{
  			// Don't repeat the restore process if the editor document is already selected.
! 			if ( this._GetSelectionDocument( FCK.EditorDocument.selection ) == FCK.EditorDocument )
  				return ;
  			this.SelectionData.select() ;
  		}
--- 261,269 ----
  		{
  			// Don't repeat the restore process if the editor document is already selected.
! 			if ( String( this._GetSelectionDocument( FCK.EditorDocument.selection ).body.contentEditable ) == 'true' )
! 			{
! 				FCK.IsSelectionChangeLocked = false ;
  				return ;
+ 			}
  			this.SelectionData.select() ;
  		}

Index: fcklanguagemanager.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fcklanguagemanager.js,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** fcklanguagemanager.js	5 May 2008 00:35:24 -0000	1.6
--- fcklanguagemanager.js	10 Aug 2008 16:46:27 -0000	1.7
***************
*** 51,54 ****
--- 51,55 ----
  		'fr-ca'	: 'French (Canada)',
  		gl		: 'Galician',
+ 		gu		: 'Gujarati',
  		he		: 'Hebrew',
  		hi		: 'Hindi',

Index: fck_ie.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fck_ie.js,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** fck_ie.js	5 May 2008 00:35:24 -0000	1.2
--- fck_ie.js	10 Aug 2008 16:46:27 -0000	1.3
***************
*** 30,38 ****
  	if ( !FCK._BehaviorsStyle )
  	{
! 		var sBasePath = FCKConfig.FullBasePath ;
  		var sTableBehavior = '' ;
  		var sStyle ;
  
! 		// The behaviors should be pointed using the FullBasePath to avoid security
  		// errors when using a different BaseHref.
  		sStyle = '<style type="text/css" _fcktemp="true">' ;
--- 30,38 ----
  	if ( !FCK._BehaviorsStyle )
  	{
! 		var sBasePath = FCKConfig.BasePath ;
  		var sTableBehavior = '' ;
  		var sStyle ;
  
! 		// The behaviors should be pointed using the BasePath to avoid security
  		// errors when using a different BaseHref.
  		sStyle = '<style type="text/css" _fcktemp="true">' ;
***************
*** 137,140 ****
--- 137,142 ----
  	this.EditorDocument.attachEvent("ondblclick", Doc_OnDblClick ) ;
  
+ 	this.EditorDocument.attachEvent("onbeforedeactivate", function(){ FCKSelection.Save( true ) ; } ) ;
+ 
  	// Catch cursor selection changes.
  	this.EditorDocument.attachEvent("onselectionchange", Doc_OnSelectionChange ) ;
***************
*** 151,154 ****
--- 153,157 ----
  
  //	FCK.Focus() ;
+ 	FCKSelection.Restore() ;
  	FCK.EditorWindow.focus() ;
  

Index: fckdocumentprocessor.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fckdocumentprocessor.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fckdocumentprocessor.js	5 May 2008 00:35:24 -0000	1.5
--- fckdocumentprocessor.js	10 Aug 2008 16:46:27 -0000	1.6
***************
*** 46,50 ****
  	var oImg = FCKTools.GetElementDocument( realElement ).createElement( 'IMG' ) ;
  	oImg.className = fakeClass ;
! 	oImg.src = FCKConfig.FullBasePath + 'images/spacer.gif' ;
  	oImg.setAttribute( '_fckfakelement', 'true', 0 ) ;
  	oImg.setAttribute( '_fckrealelement', FCKTempBin.AddElement( realElement ), 0 ) ;
--- 46,50 ----
  	var oImg = FCKTools.GetElementDocument( realElement ).createElement( 'IMG' ) ;
  	oImg.className = fakeClass ;
! 	oImg.src = FCKConfig.BasePath + 'images/spacer.gif' ;
  	oImg.setAttribute( '_fckfakelement', 'true', 0 ) ;
  	oImg.setAttribute( '_fckrealelement', FCKTempBin.AddElement( realElement ), 0 ) ;
***************
*** 143,146 ****
--- 143,159 ----
  	}
  
+ 	var processElementsByName = function( elementName, doc )
+ 	{
+ 		var aObjects = doc.getElementsByTagName( elementName );
+ 		for ( var i = aObjects.length - 1 ; i >= 0 ; i-- )
+ 			processElement( aObjects[i] ) ;
+ 	}
+ 
+ 	var processObjectAndEmbed = function( doc )
+ 	{
+ 		processElementsByName( 'object', doc );
+ 		processElementsByName( 'embed', doc );
+ 	}
+ 
  	return FCKTools.Merge( FCKDocumentProcessor.AppendNew(),
  		       {
***************
*** 149,164 ****
  					// Firefox 3 would sometimes throw an unknown exception while accessing EMBEDs and OBJECTs
  					// without the setTimeout().
! 					FCKTools.RunFunction( function()
! 						{
! 							// Process OBJECTs first, since EMBEDs can sometimes go inside OBJECTS (e.g. Flash).
! 							var aObjects = doc.getElementsByTagName( 'object' );
! 							for ( var i = aObjects.length - 1 ; i >= 0 ; i-- )
! 								processElement( aObjects[i] ) ;
! 
! 							// Now process any EMBEDs left.
! 							var aEmbeds = doc.getElementsByTagName( 'embed' ) ;
! 							for ( var i = aEmbeds.length - 1 ; i >= 0 ; i-- )
! 								processElement( aEmbeds[i] ) ;
! 						} ) ;
  				},
  
--- 162,169 ----
  					// Firefox 3 would sometimes throw an unknown exception while accessing EMBEDs and OBJECTs
  					// without the setTimeout().
! 					if ( FCKBrowserInfo.IsGecko )
! 						FCKTools.RunFunction( processObjectAndEmbed, this, [ doc ] ) ;
! 					else
! 						processObjectAndEmbed( doc ) ;
  				},
  
***************
*** 248,249 ****
--- 253,270 ----
  		fakeImg.setAttribute( '_fckflash', 'true', 0 );
  	} ) ;
+ 
+ // Buggy <span class="Apple-style-span"> tags added by Safari.
+ if ( FCKBrowserInfo.IsSafari )
+ {
+ 	FCKDocumentProcessor.AppendNew().ProcessDocument = function( doc )
+ 	{
+ 		var spans = doc.getElementsByClassName ?
+ 			doc.getElementsByClassName( 'Apple-style-span' ) :
+ 			Array.prototype.filter.call(
+ 					doc.getElementsByTagName( 'span' ),
+ 					function( item ){ return item.className == 'Apple-style-span' ; }
+ 					) ;
+ 		for ( var i = spans.length - 1 ; i >= 0 ; i-- )
+ 			FCKDomTools.RemoveNode( spans[i], true ) ;
+ 	}
+ }

Index: fckselection_gecko.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fckselection_gecko.js,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** fckselection_gecko.js	5 May 2008 00:35:24 -0000	1.6
--- fckselection_gecko.js	10 Aug 2008 16:46:27 -0000	1.7
***************
*** 76,82 ****
  		if ( oSel )
  		{
! 			// make the common case fast - for collapsed/nearly collapsed selections just return anchor.parent.
  			if ( oSel.anchorNode && oSel.anchorNode == oSel.focusNode )
! 				return oSel.anchorNode.parentNode ;
  
  			// looks like we're having a large selection here. To make the behavior same as IE's TextRange.parentElement(),
--- 76,90 ----
  		if ( oSel )
  		{
! 			// if anchorNode == focusNode, see if the selection is text only or including nodes.
! 			// if text only, return the parent node.
! 			// if the selection includes DOM nodes, then the anchorNode is the nearest container.
  			if ( oSel.anchorNode && oSel.anchorNode == oSel.focusNode )
! 			{
! 				var oRange = oSel.getRangeAt( 0 ) ;
! 				if ( oRange.collapsed || oRange.startContainer.nodeType == 3 )
! 					return oSel.anchorNode.parentNode ;
! 				else
! 					return oSel.anchorNode ;
! 			}
  
  			// looks like we're having a large selection here. To make the behavior same as IE's TextRange.parentElement(),
***************
*** 163,167 ****
  	while ( oContainer )
  	{
! 		if ( oContainer.nodeType == 1 && oContainer.tagName == nodeTagName ) return true ;
  		oContainer = oContainer.parentNode ;
  	}
--- 171,175 ----
  	while ( oContainer )
  	{
! 		if ( oContainer.nodeType == 1 && oContainer.nodeName.IEquals( nodeTagName ) ) return true ;
  		oContainer = oContainer.parentNode ;
  	}
***************
*** 181,185 ****
  	while ( oContainer )
  	{
! 		if ( oContainer.nodeName == nodeTagName )
  			return oContainer ;
  
--- 189,193 ----
  	while ( oContainer )
  	{
! 		if ( oContainer.nodeName.IEquals( nodeTagName ) )
  			return oContainer ;
  

Index: fck_contextmenu.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fck_contextmenu.js,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** fck_contextmenu.js	5 May 2008 00:35:24 -0000	1.4
--- fck_contextmenu.js	10 Aug 2008 16:46:27 -0000	1.5
***************
*** 129,132 ****
--- 129,134 ----
  
  					menu.AddSeparator() ;
+ 					menu.AddItem( 'VisitLink', FCKLang.VisitLink ) ;
+ 					menu.AddSeparator() ;
  					if ( bInsideLink )
  						menu.AddItem( 'Link', FCKLang.EditLink		, 34 ) ;
***************
*** 293,296 ****
--- 295,313 ----
  				}
  			}} ;
+ 
+ 		case 'DivContainer':
+ 			return {
+ 			AddItems : function( menu, tag, tagName )
+ 			{
+ 				var currentBlocks = FCKDomTools.GetSelectedDivContainers() ;
+ 
+ 				if ( currentBlocks.length > 0 )
+ 				{
+ 					menu.AddSeparator() ;
+ 					menu.AddItem( 'EditDiv', FCKLang.EditDiv, 75 ) ;
+ 					menu.AddItem( 'DeleteDiv', FCKLang.DeleteDiv, 76 ) ;
+ 				}
+ 			}} ;
+ 
  	}
  	return null ;

Index: fckxhtml.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fckxhtml.js,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** fckxhtml.js	5 May 2008 00:35:24 -0000	1.8
--- fckxhtml.js	10 Aug 2008 16:46:27 -0000	1.9
***************
*** 71,76 ****
  	sXHTML = sXHTML.substr( 7, sXHTML.length - 15 ).Trim() ;
  
! 	// Add a space in the tags with no closing tags, like <br/> -> <br />
! 	sXHTML = sXHTML.replace( FCKRegexLib.SpaceNoClose, ' />');
  
  	if ( FCKConfig.ForceSimpleAmpersand )
--- 71,81 ----
  	sXHTML = sXHTML.substr( 7, sXHTML.length - 15 ).Trim() ;
  
! 	// According to the doctype set the proper end for self-closing tags
! 	// HTML: <br>
! 	// XHTML: Add a space, like <br/> -> <br />
! 	if (FCKConfig.DocType.length > 0 && FCKRegexLib.HtmlDocType.test( FCKConfig.DocType ) )
! 		sXHTML = sXHTML.replace( FCKRegexLib.SpaceNoClose, '>');
! 	else
! 		sXHTML = sXHTML.replace( FCKRegexLib.SpaceNoClose, ' />');
  
  	if ( FCKConfig.ForceSimpleAmpersand )
***************
*** 200,206 ****
  			// Ignore bogus BR nodes in the DOM.
  			if ( FCKBrowserInfo.IsGecko &&
- 					htmlNode.nextSibling &&
  					( htmlNode.hasAttribute('_moz_editor_bogus_node') || htmlNode.getAttribute( 'type' ) == '_moz' ) )
! 				return false ;
  
  			// This is for elements that are instrumental to FCKeditor and
--- 205,218 ----
  			// Ignore bogus BR nodes in the DOM.
  			if ( FCKBrowserInfo.IsGecko &&
  					( htmlNode.hasAttribute('_moz_editor_bogus_node') || htmlNode.getAttribute( 'type' ) == '_moz' ) )
! 			{
! 				if ( htmlNode.nextSibling )
! 					return false ;
! 				else
! 				{
! 					htmlNode.removeAttribute( '_moz_editor_bogus_node' ) ;
! 					htmlNode.removeAttribute( 'type' ) ;
! 				}
! 			}
  
  			// This is for elements that are instrumental to FCKeditor and
***************
*** 401,404 ****
--- 413,423 ----
  			FCKXHtml._AppendAttribute( node, 'src', sSavedUrl ) ;
  
+ 		// Bug #768 : If the width and height are defined inline CSS,
+ 		// don't define it again in the HTML attributes.
+ 		if ( htmlNode.style.width )
+ 			node.removeAttribute( 'width' ) ;
+ 		if ( htmlNode.style.height )
+ 			node.removeAttribute( 'height' ) ;
+ 
  		return node ;
  	},

Index: fck_gecko.js
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/fckeditor/editor/_source/internals/fck_gecko.js,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** fck_gecko.js	5 May 2008 00:35:24 -0000	1.2
--- fck_gecko.js	10 Aug 2008 16:46:27 -0000	1.3
***************
*** 105,109 ****
  			// only perform the patched behavior if we're in an <a> tag, or the End key is pressed.
  			var parentTag = node.parentNode.tagName.toLowerCase() ;
! 			if ( ! (  parentTag == 'a' || String(node.parentNode.contentEditable) == 'false' ||
  					( ! ( FCKListsLib.BlockElements[parentTag] || FCKListsLib.NonEmptyBlockElements[parentTag] )
  					  && keyCode == 35 ) ) )
--- 105,109 ----
  			// only perform the patched behavior if we're in an <a> tag, or the End key is pressed.
  			var parentTag = node.parentNode.tagName.toLowerCase() ;
! 			if ( ! (  parentTag == 'a' || ( !FCKBrowserInfo.IsOpera && String(node.parentNode.contentEditable) == 'false' ) ||
  					( ! ( FCKListsLib.BlockElements[parentTag] || FCKListsLib.NonEmptyBlockElements[parentTag] )
  					  && keyCode == 35 ) ) )
***************
*** 350,353 ****
--- 350,356 ----
  FCK.InsertHtml = function( html )
  {
+ 	var doc = FCK.EditorDocument,
+ 		range;
+ 
  	html = FCKConfig.ProtectedSource.Protect( html ) ;
  	html = FCK.ProtectEvents( html ) ;
***************
*** 358,366 ****
  	FCKUndo.SaveUndoStep() ;
  
! 	// Insert the HTML code.
! 	this.EditorDocument.execCommand( 'inserthtml', false, html ) ;
  	this.Focus() ;
  
! 	FCKDocumentProcessor.Process( FCK.EditorDocument ) ;
  
  	// For some strange reason the SaveUndoStep() call doesn't activate the undo button at the first InsertHtml() call.
--- 361,403 ----
  	FCKUndo.SaveUndoStep() ;
  
! 	if ( FCKBrowserInfo.IsGecko )
! 	{
! 		html = html.replace( / $/, '$&<span _fcktemp="1"/>' ) ;
! 
! 		var docFrag = new FCKDocumentFragment( this.EditorDocument ) ;
! 		docFrag.AppendHtml( html ) ;
! 
! 		var lastNode = docFrag.RootNode.lastChild ;
! 
! 		range = new FCKDomRange( this.EditorWindow ) ;
! 		range.MoveToSelection() ;
! 		range.DeleteContents() ;
! 		range.InsertNode( docFrag.RootNode ) ;
! 
! 		range.MoveToPosition( lastNode, 4 ) ;
! 	}
! 	else
! 		doc.execCommand( 'inserthtml', false, html ) ;
! 
  	this.Focus() ;
  
! 	// Save the caret position before calling document processor.
! 	if ( !range )
! 	{
! 		range = new FCKDomRange( this.EditorWindow ) ;
! 		range.MoveToSelection() ;
! 	}
! 	var bookmark = range.CreateBookmark() ;
! 
! 	FCKDocumentProcessor.Process( doc ) ;
! 
! 	// Restore caret position, ignore any errors in case the document
! 	// processor removed the bookmark <span>s for some reason.
! 	try
! 	{
! 		range.MoveToBookmark( bookmark ) ;
! 		range.Select() ;
! 	}
! 	catch ( e ) {}
  
  	// For some strange reason the SaveUndoStep() call doesn't activate the undo button at the first InsertHtml() call.
***************
*** 402,405 ****
--- 439,448 ----
  	var aCreatedLinks = new Array() ;
  
+ 	// Only for Safari, a collapsed selection may create a link. All other
+ 	// browser will have no links created. So, we check it here and return
+ 	// immediatelly, having the same cross browser behavior.
+ 	if ( FCKSelection.GetSelection().isCollapsed )
+ 		return aCreatedLinks ;
+ 
  	FCK.ExecuteNamedCommand( 'Unlink', null, false, !!noUndo ) ;
  
***************
*** 421,430 ****
  			oLink.href = url ;
  
- 			// It may happen that the browser (aka Safari) decides to use the
- 			// URL as the link content to not leave it empty. In this case,
- 			// let's reset it.
- 			if ( sTempUrl == oLink.innerHTML )
- 				oLink.innerHTML = '' ;
- 
  			aCreatedLinks.push( oLink ) ;
  		}
--- 464,467 ----

--- fckdialog_ie.js DELETED ---




More information about the geeklog-cvs mailing list