diff -Naur FCKeditor.orig/FCKeditorSkin.body.php FCKeditor/FCKeditorSkin.body.php
--- FCKeditor.orig/FCKeditorSkin.body.php	2011-04-27 12:20:56.000000000 +0200
+++ FCKeditor/FCKeditorSkin.body.php	2011-04-28 12:56:32.000000000 +0200
@@ -158,6 +158,12 @@
 		if( $fp['align'] ) {
 			$ret .= "_fck_mw_location=\"" . strtolower( $fp['align'] ) . "\" ";
 		}
+		if( isset( $fp['link-url'] ) ) {
+			$ret .= "_fck_link_url=\"" . $fp['link-url'] . "\" ";
+		}
+                if( isset( $fp['link-title'] ) && is_object( $fp['link-title'] ) ) {
+                        $ret .= "_fck_link_url=\"" . $fp['link-title']->getFullText() . "\" ";
+                }
 		if( !empty( $hp ) ) {
 			if( isset( $hp['width'] ) ) {
 				$ret .= "_fck_mw_width=\"" . $hp['width'] . "\" ";
@@ -192,7 +198,7 @@
 			$class .= ( $class ? ' ' : '' ) . 'fck_mw_notfound';
 		}
 
-		if( isset( $fp['alt'] ) && !empty( $fp['alt'] ) && $fp['alt'] != 'Image:' . $orginal ) {
+		if( isset( $fp['alt'] ) && !empty( $fp['alt'] ) && $fp['alt'] != $orginal ) {
 			$ret .= "alt=\"" . htmlspecialchars( $fp['alt'] ) . "\" ";
 		} else {
 			$ret .= "alt=\"\" ";
diff -Naur FCKeditor.orig/plugins/mediawiki/dialogs/image.html FCKeditor/plugins/mediawiki/dialogs/image.html
--- FCKeditor.orig/plugins/mediawiki/dialogs/image.html	2010-07-28 10:51:08.000000000 +0200
+++ FCKeditor/plugins/mediawiki/dialogs/image.html	2011-04-28 14:04:40.000000000 +0200
@@ -71,9 +71,9 @@
 
 	GetE('txtUrl').value    = GetAttribute( oImage, '_fck_mw_filename', '' ) ;
 	GetE('txtAlt').value    = GetAttribute( oImage, 'alt', '' ) ;
-	GetE('xType').value		= GetAttribute( oImage, '_fck_mw_type', '' ) ;
+	GetE('xType').value	= GetAttribute( oImage, '_fck_mw_type', '' ) ;
 	GetE('cmbAlign').value  = GetAttribute( oImage, '_fck_mw_location', '' ) ;
-
+        GetE('txtLink').value   = GetAttribute( oImage, '_fck_link_url', '' ) ;
 	GetE('txtWidth').value  = GetAttribute( oImage, '_fck_mw_width', '' ) ;
 	GetE('txtHeight').value = GetAttribute( oImage, '_fck_mw_height', '' ) ;
 
@@ -94,12 +94,13 @@
 		window.parent.document.getElementById( 'btnCancel' ).disabled = true ;
 	}
 
-	var imgName		= GetE('txtUrl').value ;
+	var imgName	= GetE('txtUrl').value ;
 	var imgCaption	= GetE('txtAlt').value ;
-	var imgType		= GetE('xType').value ;
+	var imgType	= GetE('xType').value ;
 	var imgLocation	= GetE('cmbAlign').value ;
 	var imgWidth	= GetE('txtWidth').value ;
 	var imgHeight	= GetE('txtHeight').value ;
+	var imgLink     = GetE('txtLink').value ;
 
 	var ajaxArg = imgName ;
 
@@ -118,6 +119,9 @@
 
 		ajaxArg += 'px' ;
 	}
+	
+	if ( imgLink.length > 0 )
+		ajaxArg += '|link=' + imgLink ;
 
 	if ( imgCaption.length > 0 )
 		ajaxArg += '|' + imgCaption ;
@@ -154,7 +158,7 @@
 	SetAttribute( e, "_fck_mw_location", imgLocation ) ;
 	SetAttribute( e, "_fck_mw_width", GetE('txtWidth').value ) ;
 	SetAttribute( e, "_fck_mw_height", GetE('txtHeight').value ) ;
-
+	SetAttribute( e, "_fck_link_url", GetE('txtLink').value ) ;
 	SetAttribute( e, "width" , GetE('txtWidth').value ) ;
 	SetAttribute( e, "height", GetE('txtHeight').value ) ;
 
@@ -179,9 +183,108 @@
 	SetAttribute( e, "_fcksavedurl", realUrl ) ;
 }
 
-var searchTimer ;
+var searchLnkTimer ;
+
+//#### Called while the user types the URL.
+function OnLnkUrlChange()
+{
+        var link = GetE('txtLink').value.Trim() ;
+
+        if ( searchLnkTimer )
+                window.clearTimeout( searchLnkTimer ) ;
+
+        if ( link.StartsWith( '#' ) )
+        {
+                SetLnkSearchMessage( FCKLang.wikiLnkNoSearchAnchor || 'anchor link... no search for it' ) ;
+                return ;
+        }
+
+        if ( link.StartsWith( 'mailto:' ) )
+        {
+                SetLnkSearchMessage( FCKLang.wikiLnkNoSearchMail || 'e-mail link... no search for it' ) ;
+                return ;
+        }
+
+        if( /^\w+:\/\//.test( link ) )
+        {
+                SetLnkSearchMessage( FCKLang.wikiLnkNoSearchExt || 'external link... no search for it' ) ;
+                return ;
+        }
+
+        if ( link.length < 3  )
+        {
+                ClearLnkSearch() ;
+
+                if ( link.length == 0 )
+                        SetLnkSearchMessage( FCKLang.wikiLnkStartTyping || 'start typing in the above field' ) ;
+                else
+                        SetLnkSearchMessage( FCKLang.wikiLnkTooShort || 'too short... type more' ) ;
+                return ;
+        }
+
+        SetLnkSearchMessage( FCKLang.wikiLnkStopTyping || 'stop typing to search' ) ;
+        searchLnkTimer = window.setTimeout( StartLnkSearch, 500 ) ;
+}
+
+function StartLnkSearch()
+{
+        var link = GetE('txtLink').value.Trim() ;
+
+        if ( link.length < 3  )
+                return ;
+
+        SetLnkSearchMessage( FCKLang.wikiLnkSearching || 'searching...' ) ;
+
+        // Make an Ajax search for the pages.
+        oEditor.window.parent.sajax_request_type = 'GET' ;
+        oEditor.window.parent.sajax_do_call( 'wfSajaxSearchArticleFCKeditor', [link], LoadLnkSearchResults ) ;
+}
+
+function LoadLnkSearchResults( result )
+{
+        var results = result.responseText.Trim().split( '\n' ) ;
+        var select = GetE( 'xWikiLnkResults' ) ;
+
+        ClearLnkSearch() ;
+
+        if ( results.length == 0 || ( results.length == 1 && results[0].length == 0 ) )
+        {
+                SetLnkSearchMessage( FCKLang.wikiLnkSearchNothing || 'no articles found' ) ;
+        }
+        else
+        {
+                if ( results.length == 1 )
+                        SetLnkSearchMessage( FCKLang.wikiLnkSearch1Found || 'one article found' ) ;
+                else
+                        SetLnkSearchMessage( (FCKLang.wikiLnkSearchSeveral || '%1 articles found').replace( /%1/g, results.length ) ) ;
 
+                for ( var i = 0 ; i < results.length ; i++ )
+                        FCKTools.AddSelectOption( select, results[i], results[i] ) ;
+        }
+}
+
+function ClearLnkSearch()
+{
+        var select = GetE( 'xWikiLnkResults' ) ;
+
+        while ( select.options.length > 0 )
+                select.remove( 0 )
+}
+
+function SetLnkSearchMessage( message )
+{
+        GetE('xWikiLnkSearchStatus').innerHTML = message ;
+}
+
+function SetLnkUrl( url )
+{
+        GetE('txtLink').value = url ;
+}
+
+
+var searchTimer ;
 //#### Called while the user types the URL.
+
 function OnUrlChange()
 {
 	var link = GetE('txtUrl').value.Trim() ;
@@ -301,6 +404,18 @@
 					<input id="txtAlt" style="width: 100%" type="text"><br />
 				</td>
 			</tr>
+                        <tr>
+                                <td colspan="2">
+                                        <span fcklang="wikiImgLink">Link</span><br />
+                                        <input id="txtLink" style="width: 100%" type="text" onkeyup="OnLnkUrlChange();" />
+					<br />
+					<span fcklang="wikiLnkAutomatic">Automatic search results</span> (<span fcklang="wikiLnkStartTyping" id="xWikiLnkSearchStatus">start typing in the above field</span>)<br />
+					<select id="xWikiLnkResults" size="10" style="width: 100%; height:150px" onclick="SetLnkUrl( this.value );">
+                                </td>
+                        </tr>
+			<tr>
+				<td colspan="2">
+					
 			<tr>
 				<td valign="top" colspan="2">
 					<table cellspacing="0" cellpadding="0" border="0">
diff -Naur FCKeditor.orig/plugins/mediawiki/fckplugin.js FCKeditor/plugins/mediawiki/fckplugin.js
--- FCKeditor.orig/plugins/mediawiki/fckplugin.js	2011-04-27 13:35:32.000000000 +0200
+++ FCKeditor/plugins/mediawiki/fckplugin.js	2011-04-29 15:40:01.000000000 +0200
@@ -553,6 +553,7 @@
 							var imgStyleHeight	= ( parseInt(htmlNode.style.height) || '' ) + '';
 							var imgRealWidth	= ( htmlNode.getAttribute( 'width' ) || '' ) + '';
 							var imgRealHeight	= ( htmlNode.getAttribute( 'height' ) || '' ) + '';
+							var imgLinkUrl          = htmlNode.getAttribute( '_fck_link_url' ) || '';
 
 							stringBuilder.push( '[[Image:' );
 							stringBuilder.push( imgName );
@@ -575,13 +576,19 @@
 
 							if ( imgWidth.length > 0 ){
 								stringBuilder.push( '|' + imgWidth );
-
 								if ( imgHeight.length > 0 )
 									stringBuilder.push( 'x' + imgHeight );
+									stringBuilder.push( 'px' );
 
+							} else if ( imgHeight.length > 0 ) {
+								stringBuilder.push( '|x' + imgHeight );
 								stringBuilder.push( 'px' );
 							}
 							
+							if ( imgLinkUrl.length > 0 ){
+								stringBuilder.push( '|link=' + imgLinkUrl );
+								imgCaption = '';
+							}
 							if ( imgCaption.length > 0 )
 								stringBuilder.push( '|' + imgCaption );
 
