[TikiWiki-commits] [Git][tikiwiki/tiki][30.x] [FIX] Various fixes for new Wysiwyg editor in Tiki 30
"Jonny Bradley \(@jonnybradley\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a3c29a24842f_38198a9831562@gitlab-sidekiq-low-urgency-cpu-bound-v2-67f4b484c7-rjkq2.mail> |
Jonny Bradley pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki Commits: afd53111 by Jonny Bradley at 2026-06-24T18:56:09+00:00 [FIX] Various fixes for new Wysiwyg editor in Tiki 30 --- * [FIX] Various fixes for new Wysiwyg editor in Tiki 30 --- * [FIX] wysiwyg: Only add back in the arguments already being used in the page when preparing plugins for wysiwyg editing. Prevents all plugins needing revalidating after upgrading and re-editing, * [FIX] wysiwyg: Restore paragraphs in the new wysiwyg editor - looks like this `$fromWiki` should probably always be true now? (discuss) See merge request tikiwiki/tiki!9428 (cherry picked from commit 66a48bcefb6690fbc4186f50fb4f5319fab69406) 17e6987e [FIX] wysiwyg: Restore paragraphs in the new wysiwyg editor - looks like this... 1fc64867 [FIX] wysiwyg: Only add back in the arguments already being used in the page... Co-authored-by: Jonny Bradley <[email protected]> See merge request tikiwiki/tiki!10592 - - - - - 2 changed files: - lib/core/Services/Edit/Controller.php - lib/parser/parserlib.php Changes: ===================================== lib/core/Services/Edit/Controller.php ===================================== @@ -43,8 +43,8 @@ class Services_Edit_Controller public function action_tohtml($input) { $htmlEditor = (bool)$input->htmleditor->int(); - $wysiwyg = $input->allowhtml->int() ? true : $htmlEditor; - $res = TikiLib::lib('edit')->parseToWysiwyg($input->data->none(), false, $wysiwyg, ['wysiwyg' => $wysiwyg, 'html_editor' => $htmlEditor]); + $isHtml = $input->allowhtml->int() ? true : $htmlEditor; + $res = TikiLib::lib('edit')->parseToWysiwyg($input->data->none(), true, $isHtml, ['wysiwyg' => $isHtml, 'html_editor' => $htmlEditor]); return [ 'data' => $res, ===================================== lib/parser/parserlib.php ===================================== @@ -1024,11 +1024,14 @@ class ParserLib extends TikiDb_Bridge //* protected function convert_plugin_for_html_editor($name, $args, $plugin_result, $data, $info = []) { - $html_editor_plugin = '{' . (empty($data) ? $name : TikiLib::strtoupper($name) . '(') . ' '; + $html_editor_plugin = '{' . (empty($data) ? $name . ' ' : TikiLib::strtoupper($name) . '('); $arg_str = ''; // not using http_build_query() as it converts spaces into + if (! empty($args)) { foreach ($args as $argKey => $argValue) { - if (is_array($argValue)) { + $default = $info['params'][$argKey]['default'] ?? null; + if ((empty($argValue) && empty($default)) || $argValue === (string) $default) { + continue; + } elseif (is_array($argValue)) { if (isset($info['params'][$argKey]['separator'])) { $sep = $info['params'][$argKey]['separator']; } else { View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/afd53111759c564c93ebaa49c7b076c8587a7d03 -- View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/afd53111759c564c93ebaa49c7b076c8587a7d03 You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help _______________________________________________ TikiWiki-cvs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs