Skip to content

[FIX] 47755: Including images with drag-and-drop without specifying image size leads to missing editor buttons#11608

Open
chfsx wants to merge 1 commit into
ILIAS-eLearning:release_11from
srsolutionsag:fix/47755/11/forum-tinymce-img-no-dimensions
Open

[FIX] 47755: Including images with drag-and-drop without specifying image size leads to missing editor buttons#11608
chfsx wants to merge 1 commit into
ILIAS-eLearning:release_11from
srsolutionsag:fix/47755/11/forum-tinymce-img-no-dimensions

Conversation

@chfsx
Copy link
Copy Markdown
Member

@chfsx chfsx commented May 26, 2026

Summary

Drag-dropped images without explicit dimensions caused TinyMCE init to fail on edit of forum posts (toolbar buttons missing).

The forum does not load the image plugin and has no ILIAS-mob integration in the editor toolbar — drag-drop bypasses this by embedding images as data: URIs. On reload, TinyMCE's async image-dimension detection on dimensionless data-URI images breaks the toolbar render.

Fix

In tpl.tinymce_frm_post.js:

  • image_dimensions: false — skip async dimension detection (fixes existing posts so they become editable again).
  • image_caption: false — no figure-wrapping (consistent with no image plugin loaded).
  • paste_data_images: false and images_dataimg_filter: () => false — prevent paste/drag-drop from embedding new data-URI images.

Only tpl.tinymce_frm_post.js is touched — other TinyMCE usages (Wiki, Test, Cert, …) use tpl.tinymce.js and are not affected.

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

Test plan

  • Open a forum post that contains a drag-drop image without dimensions → editor loads with toolbar.
  • Create a new forum post and try drag-drop / paste of an image → image is not embedded as data URI.
  • Other components using TinyMCE (wiki, test, cert) → unchanged behaviour.

…mage size leads to missing editor buttons

Drag-dropped images without explicit dimensions caused TinyMCE init to
fail on edit (toolbar buttons missing). Forum has no image plugin loaded
and drag-drop bypasses the policy of disallowing inline images via data
URIs. Disable image-dimension auto-detection and prevent paste/drag
embedding of data URIs.

https://mantis.ilias.de/view.php?id=47755
@chfsx
Copy link
Copy Markdown
Member Author

chfsx commented May 26, 2026

Should be picked to trunk and release_10 as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants