1) Open the file "fck_link.js" (FCKeditor\editor\fck_link\fck_link.js) 2) Find the function "window.onload = function()" 3) At the bottom of that function add the line: GetE('txtTargetFrame').value = '_blank' ;
setting the default target for all links is basic html, not related at all with javascript. google fot base target as this forum will mess the tags, but you just need to set in the head <base target="destination">
RE: default link target
default link target - hack to fix it!
(FCKeditor\editor\fck_link\fck_link.js)
2) Find the function "window.onload = function()"
3) At the bottom of that function add the line:
GetE('txtTargetFrame').value = '_blank' ;
It seems to be working...
Full function:
window.onload = function()
{
// Translate the dialog box texts.
oEditor.FCKLanguageManager.TranslatePage(document) ;
// Fill the Anchor Names and Ids combos.
LoadAnchorNamesAndIds() ;
// Load the selected link information (if any).
LoadSelection() ;
// Update the dialog box.
SetLinkType( GetE('cmbLinkType').value ) ;
// Show/Hide the "Browse Server" button.
GetE('divBrowseServer').style.display = FCKConfig.LinkBrowser ? '' : 'none' ;
// Show the initial dialog content.
GetE('divInfo').style.display = '' ;
// Set the actual uploader URL.
if ( FCKConfig.LinkUpload )
GetE('frmUpload').action = FCKConfig.LinkUploadURL ;
// Activate the "OK" button.
window.parent.SetOkButton( true ) ;
// FK: Force target to be "_blank"
GetE('txtTargetFrame').value = '_blank' ;
}
RE: default link target - hack to fix it!
I'm using version 2.2 and id didn't work to me
Another tip to have it working properly, please?
Which version do you use, riphard?
RE: default link target
Well, it DOES work to me. When I click on the link button, it does the right thing. I fail to test the whole thing... Forgive me.
What I can't do is, when I'm typing a URL, this link must open in a new window, i.e., target='_blank'.
Example: http://www.sourceforge.net
In the target window, when I click on this link, it opens in the same window.
Any tip about this?
RE: default link target
RE: default link target
How could I do that? Changing some code? Setting some variable (I'm using the php mode)?

I'm not really an expert in javascript, that's why I don't have courage to change anything
RE: default link target
google fot base target as this forum will mess the tags, but you just need to set in the head <base target="destination">
RE: default link target
Does anybody have a method that is more standard and doesn't require modifying fckeditor code?
This will make upgrading much easier.