[TikiWiki-commits] [Git][tikiwiki/tiki][master] [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 <6a3c25c8de7b4_38312f2c3023d@gitlab-sidekiq-low-urgency-cpu-bound-v2-67f4b484c7-5qdrr.mail>

Jonny Bradley pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
66a48bce by Jonny Bradley at 2026-06-24T18:25:51+00:00
[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

- - - - -


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/66a48bcefb6690fbc4186f50fb4f5319fab69406

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/66a48bcefb6690fbc4186f50fb4f5319fab69406
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.