Skip to content

[FIX] Forum: Restore TinyMCE toolbar when editing posts with inline images#11612

Merged
mjansenDatabay merged 1 commit into
ILIAS-eLearning:release_11from
mjansenDatabay:hotfix/11/47755
May 28, 2026
Merged

[FIX] Forum: Restore TinyMCE toolbar when editing posts with inline images#11612
mjansenDatabay merged 1 commit into
ILIAS-eLearning:release_11from
mjansenDatabay:hotfix/11/47755

Conversation

@mjansenDatabay
Copy link
Copy Markdown
Contributor

@mjansenDatabay mjansenDatabay commented May 28, 2026

Summary

Restore the forum TinyMCE toolbar when editing posts that contain drag-and-dropped inline images by disabling sticky toolbar docking and aligning image_advtab with the default editor profile.

Problem

After creating a forum post with an image inserted via drag-and-drop (without manually resizing it), reopening the post for editing often shows no RTE toolbar buttons. The editor content loads, but formatting controls are missing.

Mantis: https://mantis.ilias.de/view.php?id=47755

Root Cause

The forum uses a dedicated TinyMCE template (tpl.tinymce_frm_post.js) with toolbar_sticky: true. On long thread/edit pages, sticky docking can fade out the editor header (tox-editor-dock-fadeout, hidden visibility/opacity) while inline data: images are present in the saved HTML. This makes the toolbar appear broken after save/re-edit.

Solution

Remove toolbar_sticky from the forum TinyMCE profile so the toolbar stays attached to the editor instance on edit screens. Set image_advtab: false to match tpl.tinymce.js. This combination was verified locally (see internal evidence run advtab_no_sticky).

Alternatives considered: the full TinyMCE profile change from PR #11608 (paste_data_images: false, etc.) — deferred here to keep the fix minimal and address the visible toolbar regression directly.

Changes

  • components/ILIAS/RTE/templates/default/tpl.tinymce_frm_post.js: remove toolbar_sticky; set image_advtab: false

Visual Evidence

Create Post (after drag & drop)

Before:

image

After:

image

Edit Existing Post

Before (toolbar missing):

image

After (toolbar visible):

image

Testing

Automated

  • Unit tests added / updated
  • Existing test suite passes locally
  • Commands run:
    • bash ./scripts/PHPUnit/run_tests.sh
    • ./vendor/composer/vendor/phpunit/phpunit/phpunit -c ./components/ILIAS/Forum/phpunit.xml
    • ./vendor/composer/vendor/phpunit/phpunit/phpunit components/ILIAS/RTE/tests/ilTinyMCETest.php --bootstrap components/ILIAS/RTE/tests/bootstrap.php

Manual

  • Forum: create post with drag-and-drop image (no resize) → save → edit → toolbar visible
  • Forum: edit post with inline image on a long thread page → toolbar remains visible
  • Question pool / other contexts using tpl.tinymce.js → unchanged

Assisted-by: Cursor AI

…mages

Remove toolbar_sticky from the forum-specific TinyMCE profile and set
image_advtab to false (aligned with tpl.tinymce.js). Sticky docking hid
the toolbar on long thread edit pages after drag-and-drop images were
saved as data URIs.

https: //mantis.ilias.de/view.php?id=47755
Co-authored-by: Cursor <cursoragent@cursor.com>
@mjansenDatabay mjansenDatabay self-assigned this May 28, 2026
@mjansenDatabay mjansenDatabay added bugfix php Pull requests that update Php code labels May 28, 2026
@mjansenDatabay mjansenDatabay merged commit 80f777b into ILIAS-eLearning:release_11 May 28, 2026
1 of 5 checks passed
@mjansenDatabay mjansenDatabay added javascript Pull requests that update Javascript code and removed php Pull requests that update Php code labels May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant