From 04775c0731e478a4f4b46d8e77fd36143f8ca024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Thu, 2 Feb 2017 23:20:18 +0100 Subject: [PATCH] Ability to use toWYSIWYG() for bbarea() if WYSIWYG is enabled. --- e107_handlers/form_handler.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index a588d724b..bef615938 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -1986,6 +1986,29 @@ class e_form
\n"; + if(e107::wysiwyg() === true) + { + $eParseList = e107::getConfig()->get('e_parse_list'); + + if(!empty($eParseList)) + { + $opts = array( + 'field' => $name, + ); + + foreach($eParseList as $plugin) + { + $hookObj = e107::getAddon($plugin, 'e_parse'); + + if($tmp = e107::callMethod($hookObj, 'toWYSIWYG', $value, $opts)) + { + $value = $tmp; + } + } + } + } + + $ret .= e107::getBB()->renderButtons($template,$help_tagid); $ret .= $this->textarea($name, $value, $rows, $cols, $options, $counter); // higher thank 70 will break some layouts.