Opened 16 years ago

Last modified 16 years ago

#2232 confirmed New Feature

Send the current element values as parameters to the FileBrowser (link dialog)

Reported by: Adrian Suter Owned by:
Priority: Normal Milestone:
Component: UI : Dialogs Version: FCKeditor 2.6
Keywords: HasPatch Cc:


In the link dialog, upon a click on "Browse Server" the current FCKeditor simply calls a uri defined by the configuration value

FCKConfig.LinkBrowserURL = "..." ;

Assume we defined a custom link browser. Of course we could use in our custom link browser the javascript command


to access the current value given in the url textfield of the link dialog. But this is a client side action. Wouldn't it be great to have also a server-side possibility to know the current value?

I propose the following: Add some keys (placeholders) to the LinkBrowserURL which then gets replaced by the current values.

FCKConfig.LinkBrowserURL = "custom.php?url=URL&proto=PROTOCOL" ;

Implementation: It is easy to implement this feature. In the file "editor/dialog/fck_link/fck_link.js" replace

function BrowseServer()
	OpenFileBrowser( FCKConfig.LinkBrowserURL, FCKConfig.LinkBrowserWindowWidth, FCKConfig.LinkBrowserWindowHeight ) ;


function BrowseServer()
	var uri = FCKConfig.LinkBrowserURL ;
	uri = uri.replace( /URL/g, encodeURIComponent(GetE("txtUrl").value) ) ;
	uri = uri.replace( /PROTOCOL/g, encodeURIComponent(GetE("cmbLinkProtocol").value) ) ;

	OpenFileBrowser( uri, FCKConfig.LinkBrowserWindowWidth, FCKConfig.LinkBrowserWindowHeight ) ;

Attachments (1)

2232.patch (1.2 KB) - added by Adrian Suter 16 years ago.

Download all attachments as: .zip

Change History (2)

comment:1 Changed 16 years ago by Wojciech Olchawa

Keywords: Confirmed HasPatch added

Changed 16 years ago by Adrian Suter

Attachment: 2232.patch added


Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy