Home / Remove “Browse” button and “Upload” tab in FCKEditor Link dialog

Remove “Browse” button and “Upload” tab in FCKEditor Link dialog

FCKEditor is an in browser Javascript based WYSIWYG HTML editor. It has a large number of configuration options to control various aspects of the interface. The link dialog box by default has a button to browse the server for a URL to link to and also allows image uploads when creating the link. This post looks at how to disable both of these options so they don’t appear in the interface.

If your website is database driven it doesn’t make any sense to be able to browse the server for an HTML file to link to so it makes sense to remove the browser button. Preventing image uploading is something that may or may not be useful to you but I’ve included it in this post because it’s part of the same dialog box.

Here’s a screenshot of the dialog window we’re changing the configuration options for (it appears when you click the Insert/Edit Link button). I’ve highlighted the “Browse Server” button and “Upload” tabs with a red box.

fckeditor insert/edit link

To prevent these showing, you need to set the LinkBrowser and LinkUpload configuration options to false. LinkBrowser controls the “Browse Server” button and LinkUpload the tab.

In the Javascript configuration file you would do this:

FCKConfig.LinkBrowser = false;
FCKConfig.LinkUpload = false;

This can either be done by modifying the FCKEditor’s fckconfig.js file or in a custom configuration file. A custom config file is a better option and is covered in my FCKEditor: Using a custom configuration file post.

You may need to clear the browser’s cache for the new settings to take effect. Once you’ve reloaded etc the button and tab will be gone as shown in the resulting screenshot below:

fckeditor insert/edit link after configuration change

In future posts I’ll look at some of the other configuration options which allow control over other aspects of the interface, such as image uploading etc. Make sure you subscribe to my RSS feed if you haven’t already so you don’t miss out. See below for more details.