Index: /CKEditor/branches/versions/3.6.x/CHANGES.html
===================================================================
--- /CKEditor/branches/versions/3.6.x/CHANGES.html	(revision 6765)
+++ /CKEditor/branches/versions/3.6.x/CHANGES.html	(revision 6766)
@@ -51,4 +51,5 @@
 		<li><a href="http://dev.ckeditor.com/ticket/901">#901</a> : New "Stylesheet parser" plugin that fills the Styles combo based on the CSS classes available for the content, check the new sample to learn how to use it.</li>
 		<li><a href="http://dev.ckeditor.com/ticket/6850">#6850</a> : The "About" dialog window now contains link to the User's Guide.</li>
+		<li><a href="http://dev.ckeditor.com/ticket/3582">#3582</a> : New presentation of anchor element in WYSIWYG mode.</li>
 	</ul>
 	<p>
Index: /CKEditor/branches/versions/3.6.x/_source/core/dom/element.js
===================================================================
--- /CKEditor/branches/versions/3.6.x/_source/core/dom/element.js	(revision 6765)
+++ /CKEditor/branches/versions/3.6.x/_source/core/dom/element.js	(revision 6766)
@@ -430,4 +430,7 @@
 							break;
 
+						case 'name':
+							return this.$.name;
+
 						case 'tabindex':
 							var tabIndex = standard.call( this, name );
@@ -888,9 +891,26 @@
 		 * @example
 		 */
-		hasAttribute : function( name )
-		{
-			var $attr = this.$.attributes.getNamedItem( name );
-			return !!( $attr && $attr.specified );
-		},
+		hasAttribute : (function()
+		{
+			function standard( name )
+			{
+				var $attr = this.$.attributes.getNamedItem( name );
+				return !!( $attr && $attr.specified );
+			}
+			
+			return ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 ) ? 
+					function( name )
+					{
+						// On IE < 8 the name attribute cannot be retrieved
+						// right after the element creation and setting the
+						// name with setAttribute.
+						if ( name == 'name' )
+							return !!this.$.name;
+
+						return standard.call( this, name );
+					}
+				:
+					standard;
+		})(),
 
 		/**
Index: /CKEditor/branches/versions/3.6.x/_source/plugins/elementspath/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.6.x/_source/plugins/elementspath/plugin.js	(revision 6765)
+++ /CKEditor/branches/versions/3.6.x/_source/plugins/elementspath/plugin.js	(revision 6766)
@@ -125,12 +125,23 @@
 					while ( element )
 					{
-						var ignore = 0;
+						var ignore = 0,
+							name;
+
+						if ( element.data( 'cke-display-name' ) )
+							name = element.data( 'cke-display-name' );
+						else if ( element.data( 'cke-real-element-type' ) )
+							name = element.data( 'cke-real-element-type' );
+						else
+							name = element.getName();
+
 						for ( var i = 0; i < filters.length; i++ )
 						{
-							if ( filters[ i ]( element ) === false )
+							var ret = filters[ i ]( element, name );
+							if ( ret === false )
 							{
 								ignore = 1;
 								break;
 							}
+							name = ret || name;
 						}
 
@@ -138,11 +149,4 @@
 						{
 							var index = elementsList.push( element ) - 1;
-							var name;
-							if ( element.data( 'cke-display-name' ) )
-								name = element.data( 'cke-display-name' );
-							else if ( element.data( 'cke-real-element-type' ) )
-								name = element.data( 'cke-real-element-type' );
-							else
-								name = element.getName();
 
 							// Use this variable to add conditional stuff to the
Index: /CKEditor/branches/versions/3.6.x/_source/plugins/forms/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.6.x/_source/plugins/forms/plugin.js	(revision 6765)
+++ /CKEditor/branches/versions/3.6.x/_source/plugins/forms/plugin.js	(revision 6766)
@@ -262,23 +262,27 @@
 if ( CKEDITOR.env.ie )
 {
-	CKEDITOR.dom.element.prototype.hasAttribute = function( name )
-	{
-		var $attr = this.$.attributes.getNamedItem( name );
-
-		if ( this.getName() == 'input' )
-		{
-			switch ( name )
-			{
-				case 'class' :
-					return this.$.className.length > 0;
-				case 'checked' :
-					return !!this.$.checked;
-				case 'value' :
-					var type = this.getAttribute( 'type' );
-					return type == 'checkbox' || type == 'radio' ? this.$.value != 'on' : this.$.value;
-			}
-		}
-
-		return !!( $attr && $attr.specified );
-	};
+	CKEDITOR.dom.element.prototype.hasAttribute = CKEDITOR.tools.override( CKEDITOR.dom.element.prototype.hasAttribute,
+		function( original )
+		{
+			return function( name )
+				{
+					var $attr = this.$.attributes.getNamedItem( name );
+
+					if ( this.getName() == 'input' )
+					{
+						switch ( name )
+						{
+							case 'class' :
+								return this.$.className.length > 0;
+							case 'checked' :
+								return !!this.$.checked;
+							case 'value' :
+								var type = this.getAttribute( 'type' );
+								return type == 'checkbox' || type == 'radio' ? this.$.value != 'on' : this.$.value;
+						}
+					}
+
+					return original.apply( this, arguments );
+				};
+		});
 }
Index: /CKEditor/branches/versions/3.6.x/_source/plugins/htmldataprocessor/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.6.x/_source/plugins/htmldataprocessor/plugin.js	(revision 6765)
+++ /CKEditor/branches/versions/3.6.x/_source/plugins/htmldataprocessor/plugin.js	(revision 6766)
@@ -96,12 +96,5 @@
 	var defaultDataFilterRules =
 	{
-		elements : {
-			a : function( element )
-			{
-				var attrs = element.attributes;
-				if ( attrs && attrs[ 'data-cke-saved-name' ] )
-					attrs[ 'class' ] = ( attrs[ 'class' ] ? attrs[ 'class' ] + ' ' : '' ) + 'cke_anchor';
-			}
-		},
+		elements : {},
 		attributeNames :
 		[
Index: /CKEditor/branches/versions/3.6.x/_source/plugins/link/dialogs/anchor.js
===================================================================
--- /CKEditor/branches/versions/3.6.x/_source/plugins/link/dialogs/anchor.js	(revision 6765)
+++ /CKEditor/branches/versions/3.6.x/_source/plugins/link/dialogs/anchor.js	(revision 6766)
@@ -7,15 +7,16 @@
 {
 	// Function called in onShow to load selected element.
-	var loadElements = function( editor, selection, element )
+	var loadElements = function( element )
 	{
-		this.editMode = true;
-		this.editObj = element;
+		this._.selectedElement = element;
 
-		var attributeValue = this.editObj.getAttribute( 'name' );
-		if ( attributeValue )
-			this.setValueOf( 'info','txtName', attributeValue );
-		else
-			this.setValueOf( 'info','txtName', "" );
+		var attributeValue = element.data( 'cke-saved-name' );
+		this.setValueOf( 'info','txtName', attributeValue || '' );
 	};
+
+	function createFakeAnchor( editor, anchor )
+	{
+		return editor.createFakeElement( anchor, 'cke_anchor', 'anchor' );
+	}
 
 	return {
@@ -25,48 +26,92 @@
 		onOk : function()
 		{
-			// Always create a new anchor, because of IE BUG.
-			var name = this.getValueOf( 'info', 'txtName' ),
-				element = CKEDITOR.env.ie && !( CKEDITOR.document.$.documentMode >= 8 ) ?
-				editor.document.createElement( '<a name="' + CKEDITOR.tools.htmlEncode( name ) + '">' ) :
-				editor.document.createElement( 'a' );
+			var name = this.getValueOf( 'info', 'txtName' );
+			var attributes =
+			{
+				name : name,
+				'data-cke-saved-name' : name
+			};
 
-			// Move contents and attributes of old anchor to new anchor.
-			if ( this.editMode )
+			if ( this._.selectedElement )
 			{
-				this.editObj.copyAttributes( element, { name : 1 } );
-				this.editObj.moveChildren( element );
+				if ( this._.selectedElement.data( 'cke-realelement' ) )
+				{
+					var newFake = createFakeAnchor( editor, editor.document.createElement( 'a', { attributes: attributes } ) );
+					newFake.replace( this._.selectedElement );
+				}
+				else
+					this._.selectedElement.setAttributes( attributes );
+			}
+			else
+			{
+				var sel = editor.getSelection(),
+						range = sel && sel.getRanges()[ 0 ];
+
+				// Empty anchor
+				if ( range.collapsed )
+				{
+					if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
+						attributes['class'] = 'cke_anchor_empty';
+
+					if ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 )
+					{
+						attributes[ 'contenteditable' ] = 'false';
+						attributes[ 'data-cke-editable' ] = 1;
+					}
+
+					var anchor = editor.document.createElement( 'a', { attributes: attributes } );
+
+					// Transform the anchor into a fake element for browsers that need it.
+					if ( CKEDITOR.plugins.link.fakeAnchor )
+						anchor = createFakeAnchor( editor, anchor );
+
+					range.insertNode( anchor );
+				}
+				else
+				{
+					if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
+						attributes['class'] = 'cke_anchor';
+
+					// Apply style.
+					var style = new CKEDITOR.style( { element : 'a', attributes : attributes } );
+					style.type = CKEDITOR.STYLE_INLINE;
+					style.apply( editor.document );
+				}
+			}
+		},
+
+		onHide : function()
+		{
+			delete this._.selectedElement;
+		},
+
+		onShow : function()
+		{
+			var selection = editor.getSelection(),
+				fullySelected = selection.getSelectedElement(),
+				partialSelected;
+
+			// Detect the anchor under selection.
+			if ( fullySelected )
+			{
+				if ( CKEDITOR.plugins.link.fakeAnchor )
+				{
+					var realElement = CKEDITOR.plugins.link.tryRestoreFakeAnchor( editor, fullySelected );
+					realElement && loadElements.call( this, realElement );
+					this._.selectedElement = fullySelected;
+				}
+				else if ( fullySelected.is( 'a' ) && fullySelected.hasAttribute( 'name' ) )
+					loadElements.call( this, fullySelected );
+			}
+			else
+			{
+				partialSelected = CKEDITOR.plugins.link.getSelectedLink( editor );
+				if ( partialSelected )
+				{
+					loadElements.call( this, partialSelected );
+					selection.selectElement( partialSelected );
+				}
 			}
 
-			// Set name.
-			element.data( 'cke-saved-name', false );
-			element.setAttribute( 'name', name );
-
-			// Insert a new anchor.
-			var fakeElement = editor.createFakeElement( element, 'cke_anchor', 'anchor' );
-			if ( !this.editMode )
-				editor.insertElement( fakeElement );
-			else
-			{
-				fakeElement.replace( this.fakeObj );
-				editor.getSelection().selectElement( fakeElement );
-			}
-
-			return true;
-		},
-		onShow : function()
-		{
-			this.editObj = false;
-			this.fakeObj = false;
-			this.editMode = false;
-
-			var selection = editor.getSelection();
-			var element = selection.getSelectedElement();
-			if ( element && element.data( 'cke-real-element-type' ) && element.data( 'cke-real-element-type' ) == 'anchor' )
-			{
-				this.fakeObj = element;
-				element = editor.restoreRealElement( this.fakeObj );
-				loadElements.apply( this, [ editor, selection, element ] );
-				selection.selectElement( this.fakeObj );
-			}
 			this.getContentElement( 'info', 'txtName' ).focus();
 		},
Index: /CKEditor/branches/versions/3.6.x/_source/plugins/link/dialogs/link.js
===================================================================
--- /CKEditor/branches/versions/3.6.x/_source/plugins/link/dialogs/link.js	(revision 6765)
+++ /CKEditor/branches/versions/3.6.x/_source/plugins/link/dialogs/link.js	(revision 6766)
@@ -236,5 +236,7 @@
 			advAttr( 'advTitle', 'title' );
 			advAttr( 'advContentType', 'type' );
-			advAttr( 'advCSSClasses', 'class' );
+			CKEDITOR.plugins.link.synAnchorSelector ?
+				retval.adv.advCSSClasses = getLinkClass( element )
+				: advAttr( 'advCSSClasses', 'class' );
 			advAttr( 'advCharset', 'charset' );
 			advAttr( 'advStyles', 'style' );
@@ -243,22 +245,11 @@
 
 		// Find out whether we have any anchors in the editor.
-		// Get all IMG elements in CK document.
-		var elements = editor.document.getElementsByTag( 'img' ),
-			realAnchors = new CKEDITOR.dom.nodeList( editor.document.$.anchors ),
-			anchors = retval.anchors = [];
-
-		for ( var i = 0; i < elements.count() ; i++ )
+		var anchorList = new CKEDITOR.dom.nodeList( editor.document.$.anchors ),
+			anchors = retval.anchors = [],
+			item;
+
+		for ( var i = 0, count = anchorList.count(); i < count; i++ )
 		{
-			var item = elements.getItem( i );
-			if ( item.data( 'cke-realelement' ) && item.data( 'cke-real-element-type' ) == 'anchor' )
-				anchors.push( editor.restoreRealElement( item ) );
-		}
-
-		for ( i = 0 ; i < realAnchors.count() ; i++ )
-			anchors.push( realAnchors.getItem( i ) );
-
-		for ( i = 0 ; i < anchors.length ; i++ )
-		{
-			item = anchors[ i ];
+			item = anchorList.getItem( i );
 			anchors[ i ] = { name : item.getAttribute( 'name' ), id : item.getAttribute( 'id' ) };
 		}
@@ -266,5 +257,4 @@
 		// Record down the selected element in the dialog.
 		this._.selectedElement = element;
-
 		return retval;
 	};
@@ -368,4 +358,10 @@
 		}
 		return 'String.fromCharCode(' + encodedChars.join( ',' ) + ')';
+	}
+
+	function getLinkClass( ele )
+	{
+		var className = ele.getAttribute( 'class' );
+		return className ? className.replace( /\s*(?:cke_anchor_empty|cke_anchor)(?:\s*$)?/g, '' ) : '';
 	}
 
@@ -1152,6 +1148,4 @@
 		onShow : function()
 		{
-			this.fakeObj = false;
-
 			var editor = this.getParentEditor(),
 				selection = editor.getSelection(),
@@ -1161,12 +1155,4 @@
 			if ( ( element = plugin.getSelectedLink( editor ) ) && element.hasAttribute( 'href' ) )
 				selection.selectElement( element );
-			else if ( ( element = selection.getSelectedElement() ) && element.is( 'img' )
-					&& element.data( 'cke-real-element-type' )
-					&& element.data( 'cke-real-element-type' ) == 'anchor' )
-			{
-				this.fakeObj = element;
-				element = editor.restoreRealElement( this.fakeObj );
-				selection.selectElement( this.fakeObj );
-			}
 			else
 				element = null;
@@ -1303,8 +1289,5 @@
 
 				if ( data.adv[ 'advName' ] )
-				{
 					attributes[ 'name' ] = attributes[ 'data-cke-saved-name' ] = data.adv[ 'advName' ];
-					attributes[ 'class' ] = ( attributes[ 'class' ] ? attributes[ 'class' ] + ' ' : '' ) + 'cke_anchor';
-				}
 				else
 					removeAttributes = removeAttributes.concat( [ 'data-cke-saved-name', 'name' ] );
@@ -1351,23 +1334,10 @@
 					textView = element.getHtml();
 
-				// IE BUG: Setting the name attribute to an existing link doesn't work.
-				// Must re-create the link from weired syntax to workaround.
-				if ( CKEDITOR.env.ie && !( CKEDITOR.document.$.documentMode >= 8 ) && attributes.name != element.getAttribute( 'name' ) )
-				{
-					var newElement = new CKEDITOR.dom.element( '<a name="' + CKEDITOR.tools.htmlEncode( attributes.name ) + '">',
-							editor.document );
-
-					selection = editor.getSelection();
-
-					element.copyAttributes( newElement, { name : 1 } );
-					element.moveChildren( newElement );
-					newElement.replace( element );
-					element = newElement;
-
-					selection.selectElement( element );
-				}
-
 				element.setAttributes( attributes );
 				element.removeAttributes( removeAttributes );
+
+				if ( data.adv && data.adv.advName && CKEDITOR.plugins.link.synAnchorSelector )
+					element.addClass( element.getChildCount() ? 'cke_anchor' : 'cke_anchor_empty' );
+
 				// Update text view when user changes protocol (#4612).
 				if ( href == textView || data.type == 'email' && textView.indexOf( '@' ) != -1 )
@@ -1377,12 +1347,4 @@
 						data.email.address : attributes[ 'data-cke-saved-href' ] );
 				}
-				// Make the element display as an anchor if a name has been set.
-				if ( element.getAttribute( 'name' ) )
-					element.addClass( 'cke_anchor' );
-				else
-					element.removeClass( 'cke_anchor' );
-
-				if ( this.fakeObj )
-					editor.createFakeElement( element, 'cke_anchor', 'anchor' ).replace( this.fakeObj );
 
 				delete this._.selectedElement;
Index: /CKEditor/branches/versions/3.6.x/_source/plugins/link/plugin.js
===================================================================
--- /CKEditor/branches/versions/3.6.x/_source/plugins/link/plugin.js	(revision 6765)
+++ /CKEditor/branches/versions/3.6.x/_source/plugins/link/plugin.js	(revision 6766)
@@ -31,24 +31,37 @@
 
 		// Add the CSS styles for anchor placeholders.
-		var side = editor.lang.dir == 'rtl' ? 'right' : 'left';
+
+		var side = ( editor.lang.dir == 'rtl' ? 'right' : 'left' );
+		var basicCss = 
+			'background:url(' + CKEDITOR.getUrl( this.path + 'images/anchor.gif' ) + ') no-repeat ' + side + ' center;' +
+			'border:1px dotted #00f;';
+
 		editor.addCss(
+			'a.cke_anchor,a.cke_anchor_empty' +
+			// IE6 breaks with the following selectors.
+			( ( CKEDITOR.env.ie && CKEDITOR.env.version < 7 ) ? '' :
+				',a[name],a[data-cke-saved-name]' ) +
+			'{' +
+				basicCss +
+				'padding-' + side + ':18px;' +
+				// Show the arrow cursor for the anchor image (FF at least).
+				'cursor:auto;' +
+			'}' +
+			( ( CKEDITOR.env.ie && CKEDITOR.env.version > 8 ) ? 'a[name]:empty,' : '' ) +
+			'a.cke_anchor_empty' +
+			'{' +
+				// Make empty anchor selectable on IE.
+				'display:inline-block;' +
+			'}' +
 			'img.cke_anchor' +
 			'{' +
-				'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/anchor.gif' ) + ');' +
-				'background-position: center center;' +
-				'background-repeat: no-repeat;' +
-				'border: 1px solid #a9a9a9;' +
-				'width: 18px !important;' +
-				'height: 18px !important;' +
-			'}\n' +
-			'a.cke_anchor' +
-			'{' +
-				'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/anchor.gif' ) + ');' +
-				'background-position: ' + side + ' center;' +
-				'background-repeat: no-repeat;' +
-				'border: 1px solid #a9a9a9;' +
-				'padding-' + side + ': 18px;' +
-			'}'
-		   	);
+				basicCss +
+				'width:16px;' +
+				'min-height:15px;' +
+				// The default line-height on IE.
+				'height:1.15em;' +
+				// Opera works better with "middle" (even if not perfect)
+				'vertical-align:' + ( CKEDITOR.env.opera ? 'middle' : 'text-bottom' ) + ';' +
+			'}');
 
 		// Register selection change handler for the unlink button.
@@ -61,5 +74,5 @@
 				var command = editor.getCommand( 'unlink' ),
 					element = evt.data.path.lastElement && evt.data.path.lastElement.getAscendant( 'a', true );
-				if ( element && element.getName() == 'a' && element.getAttribute( 'href' ) )
+				if ( element && element.getName() == 'a' && element.getAttribute( 'href' ) && element.getChildCount() )
 					command.setState( CKEDITOR.TRISTATE_OFF );
 				else
@@ -74,6 +87,9 @@
 				{
 					if ( element.is( 'a' ) )
-						evt.data.dialog =  ( element.getAttribute( 'name' ) && !element.getAttribute( 'href' ) ) ? 'anchor' : 'link';
-					else if ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'anchor' )
+					{
+						evt.data.dialog = ( element.getAttribute( 'name' ) && ( !element.getAttribute( 'href' ) || !element.getChildCount() ) ) ? 'anchor' : 'link';
+						editor.getSelection().selectElement( element );
+					}
+					else if ( CKEDITOR.plugins.link.tryRestoreFakeAnchor( editor, element ) )
 						evt.data.dialog = 'anchor';
 				}
@@ -118,17 +134,18 @@
 						return null;
 
-					var isAnchor = ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'anchor' );
-
-					if ( !isAnchor )
-					{
-						if ( !( element = CKEDITOR.plugins.link.getSelectedLink( editor ) ) )
+					var anchor = CKEDITOR.plugins.link.tryRestoreFakeAnchor( editor, element );
+
+					if ( !anchor && !( anchor = CKEDITOR.plugins.link.getSelectedLink( editor ) ) )
 							return null;
 
-						isAnchor = ( element.getAttribute( 'name' ) && !element.getAttribute( 'href' ) );
-					}
-
-					return isAnchor ?
-							{ anchor : CKEDITOR.TRISTATE_OFF } :
-							{ link : CKEDITOR.TRISTATE_OFF, unlink : CKEDITOR.TRISTATE_OFF };
+					var menu = {};
+
+					if ( anchor.getAttribute( 'href' ) && anchor.getChildCount() )
+						menu = { link : CKEDITOR.TRISTATE_OFF, unlink : CKEDITOR.TRISTATE_OFF };
+
+					if ( anchor && anchor.hasAttribute( 'name' ) )
+						menu.anchor = CKEDITOR.TRISTATE_OFF;
+
+					return menu;
 				});
 		}
@@ -140,5 +157,7 @@
 
 		var dataProcessor = editor.dataProcessor,
-			dataFilter = dataProcessor && dataProcessor.dataFilter;
+			dataFilter = dataProcessor && dataProcessor.dataFilter,
+			htmlFilter = dataProcessor && dataProcessor.htmlFilter,
+			pathFilters = editor._.elementsPath.filters;
 
 		if ( dataFilter )
@@ -151,6 +170,55 @@
 						{
 							var attributes = element.attributes;
-							if ( attributes.name && !attributes.href )
+							if ( !attributes.name )
+								return;
+
+							var isEmpty = !element.children.length;
+
+							if ( CKEDITOR.plugins.link.synAnchorSelector )
+							{
+								// IE needs a specific class name to be applied
+								// to the anchors, for appropriate styling.
+								var ieClass = isEmpty ? 'cke_anchor_empty' : 'cke_anchor';
+								var cls = attributes[ 'class' ];
+								if ( attributes.name && ( !cls || cls.indexOf( ieClass ) < 0 ) )
+									attributes[ 'class' ] = ( cls || '' ) + ' ' + ieClass;
+
+								if ( isEmpty && CKEDITOR.plugins.link.emptyAnchorFix )
+								{
+									attributes.contenteditable = 'false';
+									attributes[ 'data-cke-editable' ] = 1;
+								}
+							}
+							else if ( CKEDITOR.plugins.link.fakeAnchor && isEmpty )
 								return editor.createFakeParserElement( element, 'cke_anchor', 'anchor' );
+						}
+					}
+				});
+		}
+
+		if ( CKEDITOR.plugins.link.emptyAnchorFix && htmlFilter )
+		{
+			htmlFilter.addRules(
+				{
+					elements :
+					{
+						a : function( element )
+						{
+							delete element.attributes.contenteditable;
+						}
+					}
+				});
+		}
+
+		if ( pathFilters )
+		{
+			pathFilters.push( function( element, name )
+				{
+					if ( name == 'a' )
+					{
+						if ( CKEDITOR.plugins.link.tryRestoreFakeAnchor( editor, element ) || 
+							( element.getAttribute( 'name' ) && ( !element.getAttribute( 'href' ) || !element.getChildCount() ) ) )
+						{
+							return 'anchor';
 						}
 					}
@@ -197,4 +265,24 @@
 		}
 		catch( e ) { return null; }
+	},
+
+	// Opera and WebKit don't make it possible to select empty anchors. Fake
+	// elements must be used for them.
+	fakeAnchor : CKEDITOR.env.opera || CKEDITOR.env.webkit,
+
+	// For browsers that don't support CSS3 a[name]:empty().
+	synAnchorSelector : CKEDITOR.env.ie && CKEDITOR.env.version < 9,
+
+	// For browsers that have editing issue with empty anchor.
+	emptyAnchorFix : CKEDITOR.env.ie && CKEDITOR.env.version < 8,
+
+	tryRestoreFakeAnchor : function( editor, element )
+	{
+		if ( element && element.data( 'cke-real-element-type' ) && element.data( 'cke-real-element-type' ) == 'anchor' )
+		{
+			var link  = editor.restoreRealElement( element );
+			if ( link.data( 'cke-saved-name' ) )
+				return link;
+		}
 	}
 };
