Search code examples
joomlatinymcejoomla3.0

How to add parameters to plugins in Joomla?


I use some plugins in Joomla, which has parameters. When it's not Joomla, in index.html I set these parameters like:

<script>
      tinymce.init({
            selector: '#tinymce',
            plugins: 'pluginName',
            pluginName: {
                parameterName: "value"
            }
      });
</script>

But unfortunately, there's no tinyMCE.init in Joomla. I tried to find the place in /plugins/editors/tinymce/tinymce.php for this plugin settings, but can't.

Is there a way to add plugin settings/parameters in any Joomla files?


Solution

  • Found out that parameters can be setup in $scriptOptions variable. /plugins/editors/tinymce/tinymce.php ~625th line. If plugin has parameters structure like:

    pluginName: {
        parameterName: "value"
    }
    

    it must be written there like: 'pluginName' => array(parameterName => 'value'), enter image description here

    The plugin itself can be added through Joomla admin panel: Extensions -> Plugins -> Editor - TinyMCE -> Custom Plugin