Skip to content

Fix: Mail template editor Styling(#47292)#47302

Open
Deepcode007 wants to merge 1 commit intojoomla:6.1-devfrom
Deepcode007:fix/mail_editor_width_47292
Open

Fix: Mail template editor Styling(#47292)#47302
Deepcode007 wants to merge 1 commit intojoomla:6.1-devfrom
Deepcode007:fix/mail_editor_width_47292

Conversation

@Deepcode007
Copy link

Pull Request resolves #47292 .

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

In the Mail Templates edit view com_mails, there are two editor fields: a plain text "Body" field and a rich text "HTML Body" field.

Previously, the plain text <textarea> (and the HTML Body <textarea> when the editor is toggled off) had no explicit width defined. This caused them to fall back to the browser's default narrow cols behavior, leaving them much narrower than their Bootstrap col-md-9 container and creating layout inconsistency.

This PR adds the width="100%" attribute to both the body and htmlbody fields in the com_mails (template.xml)(file:administrator/components/com_mails/forms/template.xml) form definition. Joomla's [EditorField (file:libraries/src/Form/Field/EditorField.php) safely parses this string attribute and passes it to the editor plugins (None, TinyMCE, CodeMirror), which apply it as an inline style="width: 100%;" to ensure the text areas expand gracefully to fill their containers.

Testing Instructions

  1. Log into the Joomla Administrator backend.
  2. Navigate to System -> Mail Templates.
  3. Open any Mail Template for editing (e.g., "User Actions Log").
  4. Test the Plain Text Body field: Verify that the textarea of the "Body" field is now full width (100% of the available column space).
  5. Test the HTML Body Toggle: Scroll down to the "HTML Body" field. Click the Toggle Editor button below the editor to switch to the raw HTML text view. Verify that the revealed textarea is also full width and does not shrink to a narrow column constraint.

Actual result BEFORE applying this Pull Request

Screen.Recording.2026-03-05.at.2.28.06.AM.mov

Expected result AFTER applying this Pull Request

Screen.Recording.2026-03-05.at.2.29.44.AM.mov

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@brianteeman
Copy link
Contributor

This is only fixing a symptom of the original error

@Deepcode007
Copy link
Author

Hey @brianteeman, as you mentioned in comment that it was caused due to the height and width being removed from libraries\src\Form\Field\EditorField.php. Would the intended fix be adding that change back?
I have tested that locally too. (height to 500px and width to 100%).

Or would you expect any other solution? Could you please elaborate that.
Thanks a lot!

@RickR2H
Copy link
Member

RickR2H commented Mar 5, 2026

@Deepcode007 PR #47305 should fix the issue

@Deepcode007
Copy link
Author

Okay Rick, shall I close this PR then?
@brianteeman @RickR2H

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants