diff options
Diffstat (limited to 'mod/tinymce/start.php')
-rw-r--r-- | mod/tinymce/start.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mod/tinymce/start.php b/mod/tinymce/start.php index 9a33f03a3..89c378376 100644 --- a/mod/tinymce/start.php +++ b/mod/tinymce/start.php @@ -8,7 +8,24 @@ function tinymce_init() { elgg_extend_view('css/elgg', 'tinymce/css'); elgg_extend_view('css/admin', 'tinymce/css'); + + elgg_extend_view('input/longtext', 'tinymce/init'); + elgg_extend_view('embed/custom_insert_js', 'tinymce/embed_custom_insert_js'); + + elgg_register_plugin_hook_handler('register', 'menu:longtext', 'tinymce_longtext_menu'); +} + +function tinymce_longtext_menu($hook, $type, $items, $vars) { + + $items[] = array( + 'name' => 'tinymce_toggler', + 'class' => 'tinymce-toggle-editor', + 'href' => "javascript:elgg.tinymce.toggleEditor('{$vars['id']}');", + 'text' => elgg_echo('tinymce:remove'), + ); + + return $items; } elgg_register_event_handler('init', 'system', 'tinymce_init', 9999); |