[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] move wysiwyg inline editor block after is loaded
Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <69dd49c4a2487_3b18e3e0706dc@gitlab-sidekiq-low-urgency-cpu-bound-v2-7588cf5bd5-rc2g8.mail> |
Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
bbb6a41c by Olivier Kango at 2026-04-13T19:45:07+00:00
[FIX] move wysiwyg inline editor block after is loaded
---
* [FIX] move wysiwyg inline editor block after is loaded
See merge request tikiwiki/tiki!9993
- - - - -
1 changed file:
- tiki-index.php
Changes:
=====================================
tiki-index.php
=====================================
@@ -221,21 +221,6 @@ if ($prefs['tracker_wikirelation_redirectpage'] == 'y' && ! isset($_REQUEST['adm
}
}
-// Inline wysiwyg editor
-if (
- $prefs['wysiwyg_inline_editing'] == 'y' && $page &&
- ( ($tikilib->user_has_perm_on_object($user, $page, 'wiki page', 'edit')) ||
- ($tikilib->user_has_perm_on_object($user, $page, 'wiki page', 'edit_inline')) )
-) {
- TikiLib::lib('wysiwyg')->setUpInlineEditor($page);
- $inlineEditorContent = TikiLib::lib('edit')->parseToWysiwyg($info['data'], false, false, ['wysiwyg' => true, 'html_editor' => true]);
- $smarty->assign('inline_editor_content', $inlineEditorContent);
-} elseif (getCookie('wysiwyg_inline_edit', 'preview')) {
- TikiLib::lib('wysiwyg')->setUpInlineEditor($page); // init ckeditor
-} elseif (CookieConsentLib::getCookie('wysiwyg_inline_edit', 'preview')) {
- CookieConsentLib::tikiSetCookie('wysiwyg_inline_edit', 0, CookieConsentLib::BUILTIN_COOKIE_CATEGORY_FUNCTIONAL, 0, 'preview'); // kill cookie if pref off or no perms
-}
-
// Process page display options
$wikilib->processPageDisplayOptions(TikiLib::lib('header'));
@@ -277,6 +262,22 @@ if (! $info || isset($_REQUEST['date']) || isset($_REQUEST['version'])) {
}
}
+// Inline wysiwyg editor
+// Placed here to ensure $info is already populated from get_page_info() above
+if (
+ $prefs['wysiwyg_inline_editing'] == 'y' && $page &&
+ ( ($tikilib->user_has_perm_on_object($user, $page, 'wiki page', 'edit')) ||
+ ($tikilib->user_has_perm_on_object($user, $page, 'wiki page', 'edit_inline')) )
+) {
+ TikiLib::lib('wysiwyg')->setUpInlineEditor($page);
+ $inlineEditorContent = TikiLib::lib('edit')->parseToWysiwyg($info['data'], false, false, ['wysiwyg' => true, 'html_editor' => true]);
+ $smarty->assign('inline_editor_content', $inlineEditorContent);
+} elseif (getCookie('wysiwyg_inline_edit', 'preview')) {
+ TikiLib::lib('wysiwyg')->setUpInlineEditor($page); // init ckeditor
+} elseif (CookieConsentLib::getCookie('wysiwyg_inline_edit', 'preview')) {
+ CookieConsentLib::tikiSetCookie('wysiwyg_inline_edit', 0, CookieConsentLib::BUILTIN_COOKIE_CATEGORY_FUNCTIONAL, 0, 'preview'); // kill cookie if pref off or no perms
+}
+
if (empty($info)) {
// If not found maybe was because of old wiki url encode strategy, and the slugs not being regenerated after. The
// right page to display in this case is one where applying a different slug degeneration to the requested page
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/bbb6a41c9379fa7db15d036ff8bbcccf0230c18e
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/bbb6a41c9379fa7db15d036ff8bbcccf0230c18e
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