Fix output of the WYSIWYG plugin - mostly invisible plugin calls, also failure to link on each hotword occurence Foncierpedia request #5813, #5995 Based on Tiki issue #6551 patch. CKEditor surprinsingly apparently does not support being given the content in 2 different formats without the tiny hack in tiki-ckeditor.js. Index: MERN/lib/ckeditor_tiki/tiki-ckeditor.js =================================================================== --- MERN.orig/lib/ckeditor_tiki/tiki-ckeditor.js +++ MERN/lib/ckeditor_tiki/tiki-ckeditor.js @@ -207,6 +207,7 @@ $.fn.wysiwygPlugin = function (execution return; } + $this.html($this.data("source")); CKEDITOR.replace($this.attr("id"), ckoption); CKEDITOR.on("instanceReady", function (event) { // close others Index: MERN/lib/wiki-plugins/wikiplugin_wysiwyg.php =================================================================== --- MERN.orig/lib/wiki-plugins/wikiplugin_wysiwyg.php +++ MERN/lib/wiki-plugins/wikiplugin_wysiwyg.php @@ -82,13 +82,10 @@ function wikiplugin_wysiwyg($data, $para } else { $is_html = true; } - $html = TikiLib::lib('edit')->parseToWysiwyg( $data, true, $is_html, array('page' => $sourcepage) ); // Les plugins tels que DIV à l'intérieur du plugin ne sont pas analysés ou s'affichent comme vides (bogue #6551). - //$html = TikiLib::lib('tiki')->parse_data($data, array('is_html' => $is_html)); // Voir https://sourceforge.net/p/tikiwiki/mailman/message/35872294/ - // Sert seulement à populer FOOTNOTEAREA $subContext = new WikiParser_Context_PluginCall('wysiwyg', 'body'); $content = new WikiParser_Parsable($data, $subContext, $context); - $content->parse(array('is_html' => $is_html)); + $visibleHTML = $content->parse(array('is_html' => $is_html)); if (TikiLib::lib('tiki')->user_has_perm_on_object( $user, $sourcepage, 'wiki page', 'tiki_p_edit')) { $class = "wp_wysiwyg"; @@ -112,7 +109,10 @@ function wikiplugin_wysiwyg($data, $para } $namespace = htmlspecialchars($namespace); - $html = "