Extending richtext.cfc in FarCry 4

I've been a really hopeless blogger lately so I thought I'd kick things back into gear with some FarCry 4 goodness. FarCry 4 now uses TinyMCE for it's rich text editor and any customisations or editor replacements are done by extending richtext.cfc. This quick example just shows you how to change the configuration options of TinyMCE.

I wanted to specifically make changes to the HTML formatting output, HTML editor window, and default table attributes, but there is a whole lot more you can do with TinyMCE too - check out the TinyMCE Wiki for a full reference of configuration, button and plugin options.

In your project you will need to create a formtools folder inside /farcry/yourproject/packages, and create a file called richtext.cfc. This new component will extend farcry.core.packages.formtools.richtext and will override the getConfig() function - pretty straight forward really :)

Below is my sample richtext.cfc (use at your own peril, comments are welcome!)

After your new file is in place and has been saved you'll need to do an ?updateapp=1 for the new configuration to take effect. That should be all there is to it!

Comments



If you subscribe, any new posts to this thread will be sent to your email address.

BlogCFC was created by Raymond Camden. This blog is running version 5.6.001.