Yes you can have an external config file, unique to your own situation
OUTSIDE the FCEditor folder.  The usual reason he wouldnt want to
touch the config file is because when there's a new version, he'll
have to tweak it all over again.

They have  a way around that.   In addition to the config file, you
can built your own config file that is external to FCKEditor that is
processed AFTER FCKEditor's own config file.  It will override any of
the settings in the config file.  That way, you can set up your custom
toolbar (or any other setting if it comes to that) and when you copy a
new version into the FCKEDitor folder, it doesnt replace the custom
config file.

Here's how you do it:

You have a folder with the standard default FCKEditor set up.  Lets
say it's called <root>/forms/fckeditor  .  then SOMEWHERE else,
perhaps <root>/forms   you have a file called FCKEditor_Config.js
and you put in there any settings that you want to override, such as
your custom toolbar.  Here's one I have in my one:

FCKConfig.ToolbarSets["Simple"] = [
        ['Source','-'],
        ['Cut','Copy','Paste','PasteText','PasteWord','-'],
        ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
        '/',
        
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
        ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'],
        ['Link','Unlink','Anchor','Image','Rule','SpecialChar','-'],
        ['TextColor','BGColor'],
        ['FitWindow','ShowBlocks','-','About']          // No comma for the 
last row.
] ;


Then when you put your FCKEditor instance in your form on the CFM
page,  you put something like this:

<cfscript>
                fckeditor = application.beanfactory.getbean("FCKEditor");
                fckEditor.instanceName  = "story";
                fckEditor.value                 = '#Content.getStory()#';
                fckEditor.basePath              = "/forms/fckeditor/";
                fckEditor.Config["CustomConfigurationsPath"] =
"/forms/FCKEditorConfig_CMS.js"  ;
                fckEditor.toolbarset    = "Simple";
                fckEditor.width                 = "90%";
                fckEditor.height                = 400;
                fckEditor.create(); // create the editor.
        </cfscript>

The important line is the one says
fckEditor.Config["CustomConfigurationsPath"] =

You can read more about this at
http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Setting_Configurations
  although i notice that is now about the payware CKEditor not the
Free FCKEditor.  I'm not sure if the documentation for the older
FCKEditor is still on line anywhere.

I hope this helps.  Let me know if you are still unsure how to do it
and I'll see what else i can do for you.


Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month




On Thu, Jan 21, 2010 at 11:44 PM, Kim Hoopingarner
<[email protected]> wrote:
>
> I have a client that needs to have a specific toolbar for the editor - but 
> doesn't want to make the change in the config file.  Do you know any tricks 
> out there to accomplish this?  Hmmmm....
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329913
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to