The preview button included in the toolbaritem list does not appear when the editor is invoked. Could somebody please tell me how to add it to the toolbar. I am trying to work with this editor without any formal knowledge of javascript. I am developer (but primarily on the .NET platform) so I can understand the code but am not really familiar with javascript, I basically want to add a button to the toolbarset to add a preview functionality. However the editor provides a preview button as it is included in the toolbaritem set. "toolbaritems.js" I am having a problem understanding how the logic powers the editor.
Anyone ?
Anyone ?
Re: Preview button
If you don't change anything it's included by default as in the demo: http://www.fckeditor.net/demo
Re: Preview button
I am guessing that the /editor/fckconfig.js is the core config file that I need to work with in order to play around with the interface of the editor. I created a new plugin folder in the /editor/plugins folder along with its own language file and fckplugin.js file. Then I created a new toolbarset entry in the fckconfig.js file but I cannot see that toolbar in the editor on running it. Also, is there a way to find out if the default "preview" button has been removed as it does not sure in the default toolbar. Where should I check ?
Re: Preview button
Yep the fckconfig.js is the core config file. To create a new toolbar just copy and paste the default one that is there and rename and edit. eg.
FCKConfig.ToolbarSets["MyToolbar"] = [
['Source'],
['Cut','Copy','PasteText','-','Print','SpellCheck'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
'/',
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
['OrderedList','UnorderedList','-','Outdent','Indent'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor'],
['Image','Flash','Table','Rule','SpecialChar'],
'/',
['FontFormat','FontSize'],
['TextColor','BGColor'],
['FitWindow','-','About']
] ;
Then just make sure when you are creating an instance of the editor in your page / user control (Im guessing you are using .NET) set the toolbar set equal to the new toolbar name e.g.
<FCKeditorV2:FCKeditor ID="edit" BasePath="/common/FCKeditor/" runat="server" Width="920" Height="500" ToolbarSet="MyToolbar" ToolbarStartExpanded="false" />
That should work fine. Make sure you are refreshing your cache / temp internet files everytime you make a change as these will be cached by default by your browser.