aboutsummaryrefslogtreecommitdiff
path: root/mod/tinymce/start.php
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-01 08:00:53 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-01 08:00:53 +0000
commit35be18083c4262c94d58f85609aabfff5a0f9412 (patch)
treefeedddda472660f3aead25f3b8b109c94b5024d6 /mod/tinymce/start.php
parentf68f1d52556f02a85aba9ec8b09ffabbab008446 (diff)
downloadelgg-35be18083c4262c94d58f85609aabfff5a0f9412.tar.gz
elgg-35be18083c4262c94d58f85609aabfff5a0f9412.tar.bz2
Refs #2538: Cleaned up custom tinymce code into elgg.tinymce.*.
Refs #2895: TinyMCE makes use of longtext menu git-svn-id: http://code.elgg.org/elgg/trunk@8533 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/tinymce/start.php')
-rw-r--r--mod/tinymce/start.php17
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);