Remove “Browse” button and “Upload” tab in FCKEditor Image Properties dialog

10 days ago I looked at how to remove the “Browse” button and “Upload” tab in FCKEditor Link dialog in the FCKEditor in-browser Javascript HTML editor. This post looks at how to do the same thing but for the Image Properties dialog.

Removing the Upload tab is really useful if you want to provide your own custom way of uploading images (I’ll show how to do this in FCKEditor another time) and prevent the built-in way of uploading images from displaying.

Removing the “Browse Server” button probably isn’t so useful because you can easily enough override the way to browse it with your own custom dialog, but I’ve included it because it’s part of the same dialog. I’ll look at how to provide your own custom dialog in a future post as well.

The first screenshot below shows the Image Properties dialog with the Upload tab and Browse Server buttons highlighted with red boxes. Those are what we are going to remove.

removing the upload tab and browse server button in the fckeditor image properties dialog

Add the following lines to your FCKEditor configuration file to get rid of them. ImageBrowser configures the Browse Server button and ImageUpload the Upload tab.

FCKConfig.ImageBrowser = false;
FCKConfig.ImageUpload = 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:

removing the upload tab and browse server button in the fckeditor image properties dialog

I’ll post a new FCKEditor post about every ten days as part of my series of Javascript posts on Tuesdays and Fridays (and occasionally Sundays). To make sure you don’t miss out subscribe to my RSS feed if you haven’t already. See below for details.