No Code Attached Yet
avatar brianteeman
brianteeman
1 Jul 2021

The new mail templates feature has the option to send mails in html format. When enabled you have a full tinymce editor so it is expected that the features of the editor will work in the produced email.

However they dont as

  1. any images included are sent with relative paths. They should be absolute paths
  2. css styles are not embedded in the mail

Probable solution would be to load a differently configured version of tinymce in the mail templates editor

avatar brianteeman brianteeman - open - 1 Jul 2021
avatar joomla-cms-bot joomla-cms-bot - change - 1 Jul 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 Jul 2021
avatar dgrammatiko
dgrammatiko - comment - 1 Jul 2021

Probable solution would be to load a differently configured version of tinymce in the mail templates editor

Or just fix these issues on the beforeSave event (either with a plugin or directly in the model). Goes without saying that there should be also an onBeforeFormData (or whatever is the event for loading the form data) that will reverse the saved data in the db so tinyMCE (or any editor) will display what the user typed/inserted.

avatar brianteeman
brianteeman - comment - 1 Jul 2021

if i remember correctly tinymce can be configured to work correctly for emails just not with the same settings as you would use for a content item

avatar dgrammatiko
dgrammatiko - comment - 1 Jul 2021

if i remember correctly tinymce can be configured to work correctly for emails just not with the same settings as you would use for a content item

But you still have to embed the css instead of linking it, will it cover also this?

https://codepen.io/tinymce/pen/vYLqwKO

https://www.tiny.cloud/blog/email-marketing-software/

PS. this reminds me that tinyMCE still doesn't have a way to customize the

  // styles property makes that easy.
  // https://www.tiny.cloud/docs/configure/content-formatting/#formats
  formats: {
    h1: { block: "h1", styles: { fontSize: "32px" } },
    h2: { block: "h2", styles: { fontSize: "18px" } },
    cta: {
      selector: "a",
      styles: {
        backgroundColor: "#706FD3",
        padding: "12px 16px",
        color: "#ffffff",
        borderRadius: "4px",
        textDecoration: "none",
        display: "inline-block"
      }
    }
  },

  // The style_formats option controls the styleformat toolbar button menu
  // https://www.tiny.cloud/docs/configure/editor-appearance/#style_formats
  style_formats: [
    { title: "Paragraph", format: "p" },
    { title: "Heading 1", format: "h1" },
    { title: "Heading 2", format: "h2" },
    { title: "Button styles" },
    { title: "Call-to-action", format: "cta" }
  ]

I should reopen that PR #14456

avatar Quy
Quy - comment - 21 Jan 2022

any images included are sent with relative paths. They should be absolute paths

PR #36088

avatar brianteeman brianteeman - change - 1 Feb 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-02-01 23:03:25
Closed_By brianteeman
Labels Added: No Code Attached Yet
Removed: ?
avatar brianteeman brianteeman - close - 1 Feb 2022

Add a Comment

Login with GitHub to post a comment