Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] [Mail Templates] Tag is inserted only at the end of the message #34758

Closed
Kostelano opened this issue Jul 11, 2021 · 3 comments
Closed

Comments

@Kostelano
Copy link
Contributor

Steps to reproduce the issue

Go to SYSTEM - Mail Templates, open any template. Place your mouse cursor somewhere in the middle of the message text and try to insert a tag - it is inserted only at the end of the message.

This only happens with the message body WITHOUT HTML. In the field of HTML - everything is good.

@JamesNGarrett
Copy link
Contributor

https://github.com/joomla/joomla-cms/blob/4.0.0-rc3/build/media_source/com_mails/js/admin-email-template-edit.es6.js

Line 58 suggests that if the editor isn't loaded then insertTag just appends the tag to the value.

 if (Joomla.editors.instances[input.id]) {
        Joomla.editors.instances[input.id].replaceSelection(tag);
      } else {
        input.value += ` ${tag}`;
      }

@brianteeman
Copy link
Contributor

Confirmed

@Hackwar Hackwar added the bug label Feb 22, 2023
@Hackwar
Copy link
Member

Hackwar commented Nov 26, 2024

In the meantime the field is not using textarea anymore, but editor with the type forced to none, which makes this work fine. Closing this issue as solved.

@Hackwar Hackwar closed this as completed Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants