-
Notifications
You must be signed in to change notification settings - Fork 2
Creating a new plugin
Cliff Parnitzky edited this page May 4, 2015
·
4 revisions
Add the following code to TinyMceMyPlugin/config/config.php:
$GLOBALS['TINY_PLUGINS'][] = 'myplugin';
Add the following code to TinyMceMyPlugin/config/config.php:
$GLOBALS['TINY_PLUGINS'][] = 'myplugin';
$GLOBALS['TINY_BUTTONS_1'][] = 'myplugin | ';
($GLOBALS['TINY_BUTTONS_2'] or $GLOBALS['TINY_BUTTONS_3'] could also be used)
(buttons will always be added to the end of a button bar)
Implement HOOK: editTinyMcePluginLoaderConfig
Add the following code to TinyMceMyPlugin/config/config.php:
$GLOBALS['TL_HOOKS']['editTinyMcePluginLoaderConfig'][] = array('TinyMceMyPluginClass', 'myEditTinyMcePluginLoaderConfig');
Add the following code to TinyMceMyPlugin/TinyMceMyPluginClass.php:
public function myEditTinyMcePluginLoaderConfig ($arrTinyConfig) {
// edit the config here
// e.g. add additional config rows
// e.g. modify existing rows
// e.g. remove rows
return $arrTinyConfig;
}