Extending TinyMCE

Oct 5, 2016 4:19 pm

How to extend Freedom's TinyMCE editor configuration to change or add custom functionality. This method has less risk than using a completely new configuration file. The premise is that we overwrite the original function but still call the original with the same arguments then modify the configuration array that is returned.

  1. Download the override template. Template on bitbucket . You can click 'Raw' to get just the code to download.
  2. Open the template in a local editor and modify it to suit your needs, there are many examples to work with. Those that aren't being used should be removed to make the file size smaller.
  3. Upload the file to your Freedom servers filemanager. I usually place it in graphics/config/ and name is edit.config_overide.js, but this is just a suggestion
  4. In Freedom > Green > Configuration > Editor > Editor Custom Configuration File -> enter the original config path followed by a 'space' then the full path to your custom config file
    Example: /freedom_html/common/lib/editor/editor.config.js graphics/config/editor.config_overide.js
  5. Test your new customization out.