salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.46k stars 2.08k forks source link

When editing an email template with TinyMCE it is not possible to edit the html #3671

Closed amariussi closed 7 years ago

amariussi commented 7 years ago

When editing an email template with TinyMCE it is not possible to edit the html

Issue

When editing an email template with TinyMCE it is not possible to edit the html

This was possible before the introduction of Mozaik and it was a very useful set-up.

Expected Behavior

TinyMCE should be set-up in such way that html caould be edited when using TinyMCE

Actual Behavior

When using TinyMCE it is not possible to edit directly the Html as it used to be possible before the introduction of Mozaik

Possible Fix

Change the settings of TinyMCE and allow for HTML editing.

Steps to Reproduce

  1. Open a new or an existing email template with TinyMCE
  2. There is no possibility to edit the HTML directly

Context

Without the possibility to edit the html it is impossible to create a template that looks in the way a user wants it to look because many of the editing options of TinyMCE are disabled. For example: . it is not possible to change the default font . it is not possible to add a table . it is not possible to modify certain aspects of links or of tracking links . etc...

Medium/High Without the possibility to edit the html of an email template created with TinyMCE it is impossible to create a template correctly. In addition: if, once the template has been created, one uses the HTML Editor (textarea) option provided via the User preferences, there are plenty of chances that the template is broken and the user will have to continuously save the template, go to his preferences, pick the html editor as preferred editor, go back to the template, apply some modifications, save. go to his preferences, choose TinyMCE, go back to editing the template add more modifications, save, change editor in the preferences, and so on!!! Totally insane!

Your Environment

amariussi commented 7 years ago

I browsed the TinyMCE website.

There is a demo with what they call a "full featured" implementation. https://www.tinymce.com/docs/demo/full-featured/

The following are the settings used: tinymce.init({ selector: 'textarea', height: 500, theme: 'modern', plugins: [ 'advlist autolink lists link image charmap print preview hr anchor pagebreak', 'searchreplace wordcount visualblocks visualchars code fullscreen', 'insertdatetime media nonbreaking save table contextmenu directionality', 'emoticons template paste textcolor colorpicker textpattern imagetools codesample toc help' ], toolbar1: 'undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image', toolbar2: 'print preview media | forecolor backcolor emoticons | codesample help', image_advtab: true, templates: [ { title: 'Test template 1', content: 'Test 1' }, { title: 'Test template 2', content: 'Test 2' } ], content_css: [ '//fonts.googleapis.com/css?family=Lato:300,300i,400,400i', '//www.tinymce.com/css/codepen.min.css' ] });

I would use something similar to that setting and maybe remove the 'branding' at the bottom. https://www.tinymce.com/docs/configure/editor-appearance/#branding

This is the setting to remove the 'branding': tinymce.init({ selector: 'textarea', // change this value according to your HTML branding: false });

I hope this helps!