HowTo: Add a TinyMCE plugin to the system

  • Overview

    More TinyMCE ( the WYSIWYG editor) plugins exist on the net than are provided by the jamroom core.

    If you want to add a plugin to the Editor which is not in the /plugins directory in the core:
    /modules/jrCore/contrib/tinymce/plugins

    Then this doc outlines the correct way to do it so that your plugins will still be there when core updates happen.
  • Create a module via aparna

    1) Use the aparna module to create a new base module.

    ( aparna is a module that creates modules )
  • Add a directory /tinymce

    2) inside the modules/CreatedModule directory create a directory called "tinymce"
    3) upload the custom tinymce plugin to that directory so the plugin.min.js file is located at modules/CreatedModule/tinymce/plugin.min.js (this is why you can only have one tinymce plugin per module).
    4) repeat steps 1 -> 3 for each tinymce plugin you have
  • Add the plugins to the editor

    With your new custom modules active your plugins will be available to TinyMCE to use, now you just need to turn them on.

    The location to adjust the way tinymce buttons are displayed is 'form_editor.tpl', there are 2 locations for this, one is in the core and the other is in Site Builder system.

    Override these either by skin overrides:

    skins/CustomSkin/jrCore_form_editor.tpl
    skins/CustomSkin/jrSiteBuilder_form_editor.tpl

    Or by using the Template Editor.

    This method will prevent you from needing to take any action when new module updates come out, your changes will persist.
  • An example of a module which adds a TinyMCE plugin is here:
    https://www.jamroom.net/ultrajam/networkmarket/180/editorcodemirror
    This module adds code view to the editor so the HTML view is much clearer

Share This

Tags