TinyMCE Buttons Customization

Hello pgr & amariussi,

Targeted file is: modules/Emails/include/ComposeView/EmailsComposeView.js

Here is the improvised version of code:

  $.fn.EmailsComposeView.defaults = {
    "tinyMceOptions": {
      skin_url: "themes/default/css",
      skin: "",
      //plugins: "fullscreen",
      menubar: true,
      plugins: 'code print preview fullpage searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists textcolor wordcount imagetools contextmenu colorpicker textpattern',
      toolbar: ['fontselect | fontsizeselect | bold italic underline | styleselect'],
      formats: {
        bold: {inline: 'b'},
        italic: {inline: 'i'},
        underline: {inline: 'u'}
      },
      convert_urls:true,
      relative_urls:false,
      remove_script_host:false,
    }
  };
}(jQuery));

What is the gain of this code is that

  1. In modules such as Contacts, Leads, Targets, etc, when we choose to compose email from Subpanel ‘Activities’, we get the almost full interface of TinyMCE Editor
  2. In normal Emails>Compose, you get the same interface of TinyMCE - almost full

NOTE: The above mentioned tweaks is not upgrade-safe, but solves the problem by 70%.

Now we are left with TinyMCE editor interface in Email Template>Compose Email Template. I am totally in dark about that, could not do anything about that. Since I am not a coder, I don’t have ability to dig deeper.

I hope some able-developer could break the puzzle.

With thanks,

RK

1 Like