Posts

Showing posts from January, 2007

Fckeditor - removing tool bar items

I was working around for a couple of days to enable a feature were we can remove the tool bar items depending upon some permissions like hiding Style and Bold for a particular user group. I don't find any feature in-built in the FCKeditor to do this , so thought of trying some hack on it. The possible workaround I tried was this, In the FCKeditor the editor/fckeditor.html page loads up all the configurations while start-up , so we can possibly remove the tool bar items for a specific Toolbarset before creating it.Here is how I did it. In LoadToolbar() function in the fckeditor.html page I added the following lines, function LoadToolbar() { var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ; var removeToolBarSet=FCKURLParams['RemoveToolBarSet'] || ''; if ( oToolbarSet.IsLoaded ) StartEditor() ; else { oToolbarSet.OnLoad = StartEditor ; //get the current tool bar from the URL and look up in the FCKConfig.js hyCurrentToolBar=FC