Skip to content

Add Twig templates for be_ace_mm and be_tinyMCE_mm - #1594

Merged
zonky2 merged 1 commit into
release/2.5from
feature/twig-be-ace-tinymce-mm
Sep 2, 2026
Merged

Add Twig templates for be_ace_mm and be_tinyMCE_mm#1594
zonky2 merged 1 commit into
release/2.5from
feature/twig-be-ace-tinymce-mm

Conversation

@zonky2

@zonky2 zonky2 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add be_ace_mm.html.twig, mirroring the legacy .html5 inline script (editor div creation, theme detection, maxLines/minLines from rows, turbo:render rebinding)
  • Add be_tinyMCE_mm.html.twig, extending core's own @Contao/be_tinyMCE.html.twig and overriding the custom block to add max_height from rows, matching the previous PHP template inheritance
  • Both templates are picked up automatically by Contao's Twig-preferred template loader, no PHP changes needed

Test plan

  • Verified with Playwright against the devstack (mm_employees, Langtext attribute): ACE editor renders with correct maxLines/minLines, no JS errors
  • Verified TinyMCE renders with the max_height override, no JS errors
  • Confirmed the field falls back to plain core tinyMCE behavior correctly when rte is unset/default

Both legacy .html5 templates now have a Twig counterpart, so the
Twig-preferred loader picks them up automatically. be_ace_mm mirrors
the original inline-script approach (creates the ACE editor div,
theme detection, maxLines/minLines from rows, turbo:render rebinding).
be_tinyMCE_mm extends core's own @Contao/be_tinyMCE.html.twig and
overrides the "custom" block to add max_height from rows, matching
the previous PHP template inheritance.

Verified with Playwright against the mm_employees devstack: ACE editor
renders with correct maxLines/minLines, TinyMCE renders with the
max_height override, no JS errors in either case.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018K6QN9FHjYVFbdRF7PP5fi
@zonky2
zonky2 merged commit a60a8dd into release/2.5 Sep 2, 2026
4 checks passed
@zonky2
zonky2 deleted the feature/twig-be-ace-tinymce-mm branch September 2, 2026 14:20
@zonky2 zonky2 added this to the 2.5.x milestone Sep 2, 2026
@zonky2 zonky2 self-assigned this Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant