Remove "Browse" button and "Upload" tab in FCKEditor Image Properties dialog
Posted January 30th, 2009 in FCKEditor
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.

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:

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.
Related posts:
- Enable the file manager connector with FCKEditor and PHP (Sunday, July 19th 2009)
- Remove "Browse" button and "Upload" tab in FCKEditor Link dialog (Tuesday, January 20th 2009)
- FCKeditor after capital letters and colons (Wednesday, January 7th 2009)
- Always make FCKEditor paste as plain text (Tuesday, November 11th 2008)
- Using the FCKEditor HTML Editor with PHP (Wednesday, August 20th 2008)
- FCKEditor: Using a custom configuration file (Saturday, August 9th 2008)

Comments
blog comments powered by Disqus