From 5e6151addda131e0642b8796070205a71c1dcfd1 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Thu, 7 Jul 2005 16:50:16 +0000 Subject: [PATCH] Support other WYSIWYG editors (tinyMCE plugin available) --- include/functions_entries.inc.php | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php index 9723245..ec7920d 100644 --- a/include/functions_entries.inc.php +++ b/include/functions_entries.inc.php @@ -1584,8 +1584,15 @@ if (!$serendipity['wysiwyg']) { 'serendipity[body]', + 'extended' => 'serendipty[extended]' + ); + + foreach($fields AS $f_jsname => $f_item) { + serendipity_emit_htmlarea_code($f_item, $f_jsname); + } + serendipity_plugin_api::hook_event('backend_wysiwyg_finish', $fields); } echo ' '; @@ -1596,7 +1603,19 @@ function serendipity_emit_htmlarea_code($item, $jsname) { static $init = false; global $serendipity; - if (isset ($serendipity['wysiwyg']) && $serendipity['wysiwyg']) { + if (isset($serendipity['wysiwyg']) && $serendipity['wysiwyg']) { + + $eventData = array( + 'init' => &$init, + 'item' => &$item, + 'jsname' => &$jsname, + 'skip' => false + ); + serendipity_plugin_api::hook_event('backend_wysiwyg', $eventData); + + if ($eventData['skip']) { + return true; + } if (!$init) { ?> @@ -1612,7 +1631,7 @@ function serendipity_emit_htmlarea_code($item, $jsname) {