diff --git a/main/inc/lib/fckeditor/editor/dialog/fck_link/fck_link.js b/main/inc/lib/fckeditor/editor/dialog/fck_link/fck_link.js index f8585afa1d..4afd2e4bf6 100644 --- a/main/inc/lib/fckeditor/editor/dialog/fck_link/fck_link.js +++ b/main/inc/lib/fckeditor/editor/dialog/fck_link/fck_link.js @@ -483,7 +483,19 @@ function Ok() } else // Creating a new link. { - oLink = oEditor.FCK.CreateLink( sUri ) ; + // DELETED LINE ----------> oLink = oEditor.FCK.CreateLink( sUri ) ; + // INSERTED BY MEMOR: + FCK.ExecuteNamedCommand( 'CreateLink', sUri ) ; + // Look for the just created link. + var oLinks = oEditor.FCK.EditorDocument.links ; + for ( i = 0 ; i < oLinks.length ; i++ ) + { + if ( oLinks[i].href.match(sUri)) + { + var oLink = oLinks[i]; + } + } + // END INSERTED BY MEMOR if ( ! oLink ) return true ; }