Easiest way: Copy the tinymce plugin under a new name and create your
own version of it.
Hannes
Am 15.02.2017 um 17:11 schrieb Viktor Iwan:
> Hello,
> i would like to extend TinyMCE editor to use a dynamic template. At
> this moment, i'm already able to achieve this by doing core hack on
> plugins/editors/tinymce/tinymce.php
>
> on around line 609, i change :
> $templates = 'templates: [';
>
> to
>
> $templates ='templates: "/path/template.php"';
>
> Now my question if is it possible to achieve this without hacking the
> core code ? i tried Plugin Layout Override as describe
> here: https://docs.joomla.org/Layout_Overrides_in_Joomla#Plugin_Alternative_Layouts_.28Overriding_a_Plugin.29
>
> but failed since the editor does not have output/tmpl
>
> Thanks for your input
>
> --
> You received this message because you are subscribed to the Google
> Groups "Joomla! General Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to joomla-dev-general+unsub...@googlegroups.com
> <mailto:joomla-dev-general+unsub...@googlegroups.com>.
// Get the editor options
$doc = JFactory::getDocument();
$editorOptions = $doc->getScriptOptions('plg_editor_tinymce');
// Change,add,remove options and then set them
$doc->addScriptOptions('plg_system_oejcbmce', $oejcbmceOptions);
addScriptOptions -
below.
// Get the editor options
$doc = JFactory::getDocument();
$editorOptions = $doc->getScriptOptions('plg_editor_tinymce');
// Change,add,remove options and then set them
$doc->addScriptOptions('plg_editor_tinymce', $editorOptions);