Index: /CKEditor/trunk/_samples/api_dialog.html
===================================================================
--- /CKEditor/trunk/_samples/api_dialog.html	(revision 3047)
+++ /CKEditor/trunk/_samples/api_dialog.html	(revision 3048)
@@ -57,5 +57,5 @@
 			// Remove the "Link Type" combo and the "Browser
 			// Server" button from the "info" tab.
-			infoTab.remove( 'protocol' );
+			infoTab.remove( 'linkType' );
 			infoTab.remove( 'browse' );
 
Index: /CKEditor/trunk/_source/core/config.js
===================================================================
--- /CKEditor/trunk/_source/core/config.js	(revision 3047)
+++ /CKEditor/trunk/_source/core/config.js	(revision 3048)
@@ -147,5 +147,5 @@
 	 * config.plugins = 'basicstyles,button,htmldataprocessor,toolbar,wysiwygarea';
 	 */
-	plugins : 'basicstyles,button,elementspath,horizontalrule,htmldataprocessor,keystrokes,newpage,pagebreak,removeformat,smiley,sourcearea,table,specialchar,tab,toolbar,wysiwygarea',
+	plugins : 'basicstyles,button,elementspath,horizontalrule,htmldataprocessor,keystrokes,newpage,pagebreak,removeformat,smiley,link,sourcearea,table,specialchar,tab,toolbar,wysiwygarea',
 
 	/**
Index: /CKEditor/trunk/_source/core/dom/element.js
===================================================================
--- /CKEditor/trunk/_source/core/dom/element.js	(revision 3047)
+++ /CKEditor/trunk/_source/core/dom/element.js	(revision 3048)
@@ -686,4 +686,31 @@
 		},
 
+		copyAttributes : function( target, skip )
+		{
+			skip || ( skip = {} );
+			var attributes = this.$.attributes ;
+
+			for ( var n = 0 ; n < attributes.length ; n++ )
+			{
+				var attr = attributes[n] ;
+
+				if ( attr.specified )
+				{
+					var attrName = attr.nodeName ;
+					if ( attrName in skip )
+						continue ;
+
+					var attrValue = this.getAttribute( attrName );
+					if ( !attrValue )
+						attrValue = attr.nodeValue ;
+
+					target.setAttribute( attrName, attrValue );
+				}
+			}
+
+			if ( this.$.style.cssText !== '' )
+				target.$.style.cssText = this.$.style.cssText ;
+		},
+
 		/**
 		 * Shows this element (display it).
Index: /CKEditor/trunk/_source/core/htmlparser/element.js
===================================================================
--- /CKEditor/trunk/_source/core/htmlparser/element.js	(revision 3047)
+++ /CKEditor/trunk/_source/core/htmlparser/element.js	(revision 3048)
@@ -67,4 +67,7 @@
 	};
 
+	var ckeAttrRegex = /^_cke/,
+		ckeClassRegex = /(^|\s+)cke_[^\s]*/g;
+
 	CKEDITOR.htmlParser.element.prototype =
 	{
@@ -131,6 +134,16 @@
 			{
 				// Ignore all attributes starting with "_cke".
-				if ( !/^_cke/.test( a ) )
-					attribsArray.push( [ a, this.attributes[ a ] ] );
+				if ( ckeAttrRegex.test( a ) )
+					continue;
+
+				// Ignore all cke_* CSS classes.
+				if ( a.toLowerCase() == 'class' )
+				{
+					this.attributes[ a ] = CKEDITOR.tools.ltrim( this.attributes[ a ].replace( ckeClassRegex, '' ) );
+					if ( this.attributes[ a ] == '' )
+						continue;
+				}
+
+				attribsArray.push( [ a, this.attributes[ a ] ] );
 			}
 
Index: /CKEditor/trunk/_source/plugins/dialogui/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/dialogui/plugin.js	(revision 3047)
+++ /CKEditor/trunk/_source/plugins/dialogui/plugin.js	(revision 3048)
@@ -884,4 +884,17 @@
 				{
 					this.select();
+				},
+
+				/**
+				 * Sets the value of this text input object.
+				 * @param {Object} value The new value.
+				 * @returns {CKEDITOR.ui.dialog.textInput} The current UI element.
+				 * @example
+				 * uiElement.setValue( 'Blamo' );
+				 */
+				setValue : function( value )
+				{
+					value = value || '';
+					return CKEDITOR.ui.dialog.uiElement.prototype.setValue.call( this, value );
 				}
 			}, commonPrototype, true );
Index: /CKEditor/trunk/_source/plugins/fakeobjects/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/fakeobjects/plugin.js	(revision 3047)
+++ /CKEditor/trunk/_source/plugins/fakeobjects/plugin.js	(revision 3048)
@@ -6,14 +6,28 @@
 CKEDITOR.plugins.add( 'fakeobjects' );
 
-CKEDITOR.editor.prototype.createFakeElement = function( realElement, className )
+CKEDITOR.editor.prototype.createFakeElement = function( realElement, className, realElementType )
 {
-	return this.document.createElement( 'img',
-		{
-			attributes :
-				{
-					'class' : className,
-					src : CKEDITOR.getUrl( 'images/spacer.gif' ),
-					_cke_realelement : encodeURIComponent( realElement.getOuterHtml() )
-				}
-		});
+	var attributes = 
+	{
+		'class' : className,
+		src : CKEDITOR.getUrl( 'images/spacer.gif' ),
+		_cke_realelement : encodeURIComponent( realElement.getOuterHtml() )
+	};
+	if ( realElementType )
+		attributes._cke_real_element_type = realElementType;
+
+	return this.document.createElement( 'img', { attributes : attributes } );
 };
+
+CKEDITOR.editor.prototype.restoreRealElement = function( fakeElement )
+{
+	var html = decodeURIComponent( fakeElement.getAttribute( '_cke_realelement' ) ),
+		realElement = CKEDITOR.dom.element.createFromHtml( html, this.document );
+
+	if ( fakeElement.$.style.width )
+		realElement.setStyle( 'width', fakeElement.$.style.width );
+	if ( fakeElement.$.style.height )
+		realElement.setStyle( 'height', fakeElement.$.style.height );
+
+	return realElement;
+};
Index: /CKEditor/trunk/_source/plugins/pagebreak/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/pagebreak/plugin.js	(revision 3047)
+++ /CKEditor/trunk/_source/plugins/pagebreak/plugin.js	(revision 3048)
@@ -50,5 +50,5 @@
 					if ( div.getStyle( 'page-break-after' ) == 'always' && !/[^\s\u00A0]/.test( div.getText() ) )
 					{
-						editor.createFakeElement( div, 'cke_pagebreak' ).replace( div );
+						editor.createFakeElement( div, 'cke_pagebreak', 'div' ).replace( div );
 					}
 				}
@@ -66,5 +66,5 @@
 		
 		// Creates the fake image used for this element.
-		breakObject = editor.createFakeElement( breakObject, 'cke_pagebreak' );
+		breakObject = editor.createFakeElement( breakObject, 'cke_pagebreak', 'div' );
 		
 		var ranges = editor.getSelection().getRanges();
Index: /CKEditor/trunk/_source/plugins/toolbar/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/toolbar/plugin.js	(revision 3047)
+++ /CKEditor/trunk/_source/plugins/toolbar/plugin.js	(revision 3048)
@@ -212,4 +212,5 @@
 		'Subscript', 'Superscript', '-',
 		'SelectAll', 'RemoveFormat', '-',
+		'Link', 'Unlink', 'Anchor', '-',
 		'Table', 'Smiley', 'HorizontalRule', 'SpecialChar', 'PageBreak'
 	]
