Index: /FCKeditor/branches/features/anchors/editor/_source/internals/fck_contextmenu.js
===================================================================
--- /FCKeditor/branches/features/anchors/editor/_source/internals/fck_contextmenu.js	(revision 22)
+++ /FCKeditor/branches/features/anchors/editor/_source/internals/fck_contextmenu.js	(revision 23)
@@ -88,4 +88,11 @@
 				if ( bInsideLink || FCK.GetNamedCommandState( 'Unlink' ) != FCK_TRISTATE_DISABLED )
 				{
+					// Go up to the anchor to test its properties
+					var oLink = FCKSelection.MoveToAncestorNode( 'A' ) ; 
+					var bIsAnchor = ( oLink && oLink.name.length > 0 && oLink.href.length == 0 ) ;
+					// If it isn't a link then don't add the Link context menu
+					if ( bIsAnchor )
+						return ; 
+
 					menu.AddSeparator() ;
 					if ( bInsideLink )
@@ -110,5 +117,9 @@
 			AddItems : function( menu, tag, tagName )
 			{
-				if ( tagName == 'IMG' && tag.getAttribute( '_fckanchor' ) )
+				// Go up to the anchor to test its properties
+				var oLink = FCKSelection.MoveToAncestorNode( 'A' ) ; 
+				var bIsAnchor = ( oLink && oLink.name.length > 0 && oLink.href.length == 0 ) ;
+
+				if ( bIsAnchor || ( tagName == 'IMG' && tag.getAttribute( '_fckanchor' ) ) )
 				{
 					menu.AddSeparator() ;
Index: /FCKeditor/branches/features/anchors/editor/_source/internals/fckdocumentprocessor.js
===================================================================
--- /FCKeditor/branches/features/anchors/editor/_source/internals/fckdocumentprocessor.js	(revision 22)
+++ /FCKeditor/branches/features/anchors/editor/_source/internals/fckdocumentprocessor.js	(revision 23)
@@ -34,21 +34,32 @@
 
 // Link Anchors
-var FCKAnchorsProcessor = FCKDocumentProcessor.AppendNew() ;
-FCKAnchorsProcessor.ProcessDocument = function( document )
+if ( FCKBrowserInfo.IsIE )
 {
-	var aLinks = document.getElementsByTagName( 'A' ) ;
+	var FCKAnchorsProcessor = FCKDocumentProcessor.AppendNew() ;
+	FCKAnchorsProcessor.ProcessDocument = function( document )
+	{
+		var aLinks = document.getElementsByTagName( 'A' ) ;
 
-	var oLink ;
-	var i = aLinks.length - 1 ;
-	while ( i >= 0 && ( oLink = aLinks[i--] ) )
-	{
-		// If it is anchor.
-		if ( oLink.name.length > 0 && ( !oLink.getAttribute('href') || oLink.getAttribute('href').length == 0 ) )
+		var oLink ;
+		var i = aLinks.length - 1 ;
+		while ( i >= 0 && ( oLink = aLinks[i--] ) )
 		{
-			var oImg = FCKDocumentProcessor_CreateFakeImage( 'FCK__Anchor', oLink.cloneNode(true) ) ;
-			oImg.setAttribute( '_fckanchor', 'true', 0 ) ;
-			
-			oLink.parentNode.insertBefore( oImg, oLink ) ;
-			oLink.parentNode.removeChild( oLink ) ;
+			// If it is anchor. Doesn't matter if it's also a link (even better: we show that it's both a link and an anchor)
+			if ( oLink.name.length > 0 )
+			{
+				//if the anchor has some content then we just add a temporary class
+				if ( oLink.innerHTML != '' )
+				{
+					oLink.className += ' FCK__AnchorC' ;
+				}
+				else
+				{
+					var oImg = FCKDocumentProcessor_CreateFakeImage( 'FCK__Anchor', oLink.cloneNode(true) ) ;
+					oImg.setAttribute( '_fckanchor', 'true', 0 ) ;
+					
+					oLink.parentNode.insertBefore( oImg, oLink ) ;
+					oLink.parentNode.removeChild( oLink ) ;
+				}
+			}
 		}
 	}
Index: /FCKeditor/branches/features/anchors/editor/_source/internals/fckregexlib.js
===================================================================
--- /FCKeditor/branches/features/anchors/editor/_source/internals/fckregexlib.js	(revision 22)
+++ /FCKeditor/branches/features/anchors/editor/_source/internals/fckregexlib.js	(revision 23)
@@ -36,5 +36,6 @@
 HeadCloser		: /<\/head\s*>/i ,
 
-TableBorderClass : /\s*FCK__ShowTableBorders\s*/ ,
+// Temporary classes (Tables without border, Anchors with content) used in IE
+FCK_Class		: /\s*FCK__[A-Za-z]*\s*/ ,
 
 // Validate element names (it must be in lowercase).
Index: /FCKeditor/branches/features/anchors/editor/_source/internals/fcktools.js
===================================================================
--- /FCKeditor/branches/features/anchors/editor/_source/internals/fcktools.js	(revision 22)
+++ /FCKeditor/branches/features/anchors/editor/_source/internals/fcktools.js	(revision 23)
@@ -194,2 +194,19 @@
 	return new fCloneCreator ;
 }
+
+// Remove a temporary class from a node according to a regExp
+FCKTools.RemoveClass = function( node, regX )
+{
+	var oClassAtt = node.attributes.getNamedItem( 'class' ) ;
+
+	if ( oClassAtt && regX.test( oClassAtt.nodeValue ) )
+	{
+		var sClass = oClassAtt.nodeValue.replace( regX, '' ) ;
+
+		if ( sClass.length == 0 )
+			node.attributes.removeNamedItem( 'class' ) ;
+		else
+			oClassAtt.nodeValue = sClass ;
+	}
+}
+
Index: /FCKeditor/branches/features/anchors/editor/_source/internals/fckxhtml.js
===================================================================
--- /FCKeditor/branches/features/anchors/editor/_source/internals/fckxhtml.js	(revision 22)
+++ /FCKeditor/branches/features/anchors/editor/_source/internals/fckxhtml.js	(revision 23)
@@ -297,4 +297,15 @@
 			FCKXHtml._AppendAttribute( node, 'href', sSavedUrl ) ;
 
+
+		// Anchors with content has been marked with an additional class, now we must remove it.
+		if ( FCKBrowserInfo.IsIE )
+		{
+			FCKTools.RemoveClass( node, FCKRegexLib.FCK_Class ) ;
+
+			// Buggy IE, doesn't copy the name of changed anchors.
+			if ( htmlNode.name )
+				FCKXHtml._AppendAttribute( node, 'name', htmlNode.name ) ;
+		}
+
 		FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
 
@@ -340,14 +351,7 @@
 		// table class the FCK__ShowTableBorders rule. So now we must remove it.
 
-		var oClassAtt = node.attributes.getNamedItem( 'class' ) ;
-
-		if ( oClassAtt && FCKRegexLib.TableBorderClass.test( oClassAtt.nodeValue ) )
-		{
-			var sClass = oClassAtt.nodeValue.replace( FCKRegexLib.TableBorderClass, '' ) ;
-
-			if ( sClass.length == 0 )
-				node.attributes.removeNamedItem( 'class' ) ;
-			else
-				FCKXHtml._AppendAttribute( node, 'class', sClass ) ;
+		if ( FCKBrowserInfo.IsIE )
+		{
+			FCKTools.RemoveClass( node, FCKRegexLib.FCK_Class ) ;
 		}
 
Index: /FCKeditor/branches/features/anchors/editor/css/fck_editorarea.css
===================================================================
--- /FCKeditor/branches/features/anchors/editor/css/fck_editorarea.css	(revision 22)
+++ /FCKeditor/branches/features/anchors/editor/css/fck_editorarea.css	(revision 23)
@@ -29,5 +29,5 @@
 }
 
-a
+a[href]
 {
 	color: #0000FF !important;	/* For Firefox... mark as important, otherwise it becomes black */
Index: /FCKeditor/branches/features/anchors/editor/css/fck_internal.css
===================================================================
--- /FCKeditor/branches/features/anchors/editor/css/fck_internal.css	(revision 22)
+++ /FCKeditor/branches/features/anchors/editor/css/fck_internal.css	(revision 23)
@@ -34,5 +34,5 @@
 	height: 80px;
 }
-
+/* empty anchors */
 .FCK__Anchor
 {
@@ -42,4 +42,22 @@
 	width: 16px;
 	height: 15px;
+}
+/* anchors with content */
+.FCK__AnchorC
+{
+	border: 1px dotted #00F;
+	background-position: 0 center;
+	background-image: url(images/fck_anchor.gif);
+	background-repeat: no-repeat;
+	padding-left:18px;
+}
+/* any anchor for non-IE, if we combine it with the previous rule IE ignores all.*/
+a[name]
+{
+	border: 1px dotted #00F;
+	background-position: 0 center;
+	background-image: url(images/fck_anchor.gif);
+	background-repeat: no-repeat;
+	padding-left:18px;
 }
 
Index: /FCKeditor/branches/features/anchors/editor/dialog/fck_anchor.html
===================================================================
--- /FCKeditor/branches/features/anchors/editor/dialog/fck_anchor.html	(revision 22)
+++ /FCKeditor/branches/features/anchors/editor/dialog/fck_anchor.html	(revision 23)
@@ -17,4 +17,5 @@
 var oEditor	= window.parent.InnerDialogLoaded() ;
 var FCK		= oEditor.FCK ;
+var FCKBrowserInfo = oEditor.FCKBrowserInfo ;
 
 // Gets the document DOM
@@ -30,4 +31,12 @@
 	else
 		oFakeImage = null ;
+}
+
+//Search for a real anchor
+if ( !oFakeImage )
+{
+	oAnchor = FCK.Selection.MoveToAncestorNode( 'A' ) ;
+	if ( oAnchor )
+		FCK.Selection.SelectNode( oAnchor ) ;
 }
 
@@ -55,13 +64,51 @@
 	oEditor.FCKUndo.SaveUndoStep() ;
 	
-	oAnchor		= FCK.EditorDocument.createElement( 'DIV' ) ;
-	oAnchor.innerHTML = '<a name="' + GetE('txtName').value + '"><\/a>' ;
-	oAnchor = oAnchor.firstChild ;
+	if ( oAnchor )	// Modifying an existent anchor.
+	{
+		// Buggy explorer, bad bad browser. http://alt-tag.com/blog/archives/2006/02/ie-dom-bugs/
+		// Instead of just replacing the .name for the existing anchor (in order to preserve the content), we must remove the .name
+		// and assign .name, although it won't appear until it's specially processed in fckxhtml.js
 
-	oFakeImage	= oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__Anchor', oAnchor ) ;
-	oFakeImage.setAttribute( '_fckanchor', 'true', 0 ) ;
-	oFakeImage	= FCK.InsertElementAndGetIt( oFakeImage ) ;
+		// We remove the previous name
+		oAnchor.removeAttribute( 'name' ) ;
+		// Now we set it, but later we must process it specially
+		oAnchor.name = GetE( 'txtName' ).value ;
 
-//	oEditor.FCK.InsertHtml( '<a name="' + GetE('txtName').value + '"><\/a>' ) ;
+		return true ;
+	}
+
+	// Create a new anchor preserving the current selection
+	oAnchor = oEditor.FCK.CreateLink( '#' ) ;
+	if ( !oAnchor )
+	{
+		// Nothing was selected, so now just create a normal A
+		oAnchor = oEditor.FCK.CreateElement( 'a' ) ; 
+	}
+	else
+	{
+		// Remove the fake href
+		oAnchor.removeAttribute( 'href' ) ; 
+	}
+	// Set the name
+	oAnchor.name = GetE( 'txtName' ).value ;
+
+	// IE does require special processing to show the Anchor's image
+	if ( FCKBrowserInfo.IsIE )
+	{
+		if ( oAnchor.innerHTML != '' )
+		{
+			oAnchor.className += ' FCK__AnchorC' ;
+		}
+		else
+		{
+			var oImg = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__Anchor', oAnchor.cloneNode(true) ) ;
+			oAnchor.setAttribute( '_fckanchor', 'true', 0 ) ;
+			
+			oAnchor.parentNode.insertBefore( oImg, oAnchor ) ;
+			oAnchor.parentNode.removeChild( oAnchor ) ;
+		}
+
+	}
+
 	return true ;
 }
Index: /FCKeditor/branches/features/anchors/editor/dialog/fck_link/fck_link.js
===================================================================
--- /FCKeditor/branches/features/anchors/editor/dialog/fck_link/fck_link.js	(revision 22)
+++ /FCKeditor/branches/features/anchors/editor/dialog/fck_link/fck_link.js	(revision 23)
@@ -158,4 +158,12 @@
 			aAnchors[ aAnchors.length ] = oEditor.FCK.GetRealElement( oImages[i] ) ;
 	}
+
+	// Add also real anchors
+	var oLinks = oEditor.FCK.EditorDocument.getElementsByTagName( 'A' ) ;
+	for( var i = 0 ; i < oLinks.length ; i++ )
+	{
+		if ( oLinks[i].name && ( oLinks[i].name.length > 0 ) )
+			aAnchors[ aAnchors.length ] = oLinks[i] ;
+	}
 	
 	var aIds = oEditor.FCKTools.GetAllChildrenIds( oEditor.FCK.EditorDocument.body ) ;
@@ -188,6 +196,6 @@
 	var sHRef = oLink.getAttribute( '_fcksavedurl' ) ;
 	if ( sHRef == null )
-		sHRef = oLink.getAttribute( 'href' , 2 ) + '' ;
-	
+		sHRef = oLink.getAttribute( 'href' , 2 ) || '' ;
+
 	// Look for a popup javascript link.
 	var oPopupMatch = oRegex.PopupUri.exec( sHRef ) ;
