Email Templates HTML Editor

To be honest, just the fact that people want to hack the system just to be able to use it at its full potential, should ring an alarm bell.
Is there a plan to reintroduce TinyMCE as an option for editing HTML templates ? Some ā€œCreate with Mozaik, or Create with TinyMCEā€ feature ?

1 Like

That was a bug (a very annoying one) and there was work to solve it, and I think (not sure, though) that now there is editor choice.

But some problems remain with pasting HTML directly, and with saving images in templates. It seems the problems are intricate - something in the caching system. If you search GitHub youā€™ll find the issues there, and theyā€™re being worked on but resources are scarceā€¦

Obviously this has to work normally soon, itā€™s a basic featureā€¦

1 Like

You mean in the current version? Using the latest one, afaik 7.9.4 is the latest release.

Not a programmer, but if there is a way to helpā€¦

1 Like

Yes, I think there was editor choice in 7.9.4ā€¦ maybe some setting in the Admin area?

I am a bit lost about these issues on GitHub. I guess if you can find your way in there (many issues, some overlapping, some closed, some ongoing, ā€¦) and contribute your own experiments that might help.

Sometimes the issues are tricky (work for some people, not for others) and whoever can provide a detailed list of ā€œsteps to reproduceā€ that always reproduces the problem, it is really helpful.

Do you mean that in 7.9.4 is a way to switch back to old TinyMCE? I just updatet, but I can not find itā€¦

The only way that looks something like this is in user profile, at the bottom, in email settings.

But if I change from Mozaik to TinyMCE it asks me to add an email address. I would like not to do it at a user levelā€¦ I have email addresses configured in general settingsā€¦

Thanks!

@mortensen @pgr

Wow, selecting in User preferences different editors actually works! Well, my Suite still hangs when saving my template, but smaller HTML code is saved and retained correctly. Justā€¦ wow! Such a hidden way to place the choice for an editor!!

Well, thereā€™s really no better way to put it; itā€™s a per-user choiceā€¦ and itā€™s not something you change every day, soā€¦

But as time goes by this will be better documented.

@bsarbu you were able to select it without configuring an email address?

Yep! I solved it!

Thanks!

Thank you very much for this patch, itā€™s really helped us to get rid of this ā€œmozaik issueā€.

But can you suggest how to fix this issue in Campaigns? when weā€™re creating campaings mozaik appears there and breaks our templates, which is very frustrating.

Iā€™ve tried to digg out the Campaings module and make changes similar to ones done in Email Templates, but it desnā€™t seem to work.

On which version did You apply the hack (fix ?).
In 7.9 it should already be possible to select editor in user preferences.
On other versions 7.8.x it should work for Campaigns too.

we user suiteCRM Version 7.8.9.

While applying your patch there were minor things to be done manually after which the Email Templates module works with TinyMCE, but the Campaigns module still operates with Mozaik.

This is how it looks like for us: https://prnt.sc/hwfxq1

Do you think weā€™re missing something which makes it not working in Campaings for us? Can you suggest please what can we do to get it working?

Yes, it looks like something is missing. If You applied latest patch from this thread it should work.
If patch couldnā€™t be applied without errors (I think You wrote, that some tweaking was necessary) then something perhaps didnā€™t get applied.

For patch to work it is important that variable use_mozaik is in relevant files and that it is set to false.

Unfortunately I donā€™t have enough time to reapply the patch on 7.9 version since.

But on my fork on github there is branch Mozaik_Fix with isolated patch

You can do git checkout and then diff between hotfix in Mozaik_Fix branches to see all changes.

Do you mean this one last patch? or the previous which contains two patches to choose from?

The thing is iā€™ve looked into the patches and it doesnā€™t seem to make any changes to the Campaigns module, that is why iā€™m curious whether it can solve the issue or not.

Yes. If i remember correctly Campaign module uses files from emailtemplates module.

As far as I can see from the files, Campaigns module has itā€™s own initialization of the editor. but that initialization is different from the one used in EmailTemplates, that makes a challenge to get Tiny working in Campaigns

Iā€™m trying to test this option. Could you advice what variable should be set to false, php one or javascript one? Is it enough to just set this variable to false in the beginning of file?

This man has saved me a lot of hoursā€¦ after spending endless time of finding a way to create a newsletter template using SuiteCRM, Iā€™ve finally found this blog post where he described how to switch from Mozaik to either TinyMCE or plain HTML Editor: https://www.vishalon.net/blog/suitecrm-create-email-template-without-fancy-aka-ugly-mozaik-editor