Change default types to WYSIWYG

Is there a way to change any of the default textarea fieilds to a wysiwyg field.

For example the description field is a textfield. I’d like it to be a html formated field so users can store html in it and have it look correct on a opp.

Also for calls, meetings, tasks, notes, I’d like the description to be a wysiwyg field type as well. Is this possible? Is there plugin out there that changes all my text fields to html or wysisyg fields?

For calls, meetings, tasks, and notes, this has to work for the quick create off an opp, lead, or contact as well.

I am not aware of any plugin for this. Yet i know the code.
You have to do 1 thing only

Open file modules/your_module_name/views/view.edit.php
and then go to “display()” function and call my function within this one

  function displayTMCE(){
        global $locale;

        $tiny = new SugarTinyMCE();
        $tinyMCE = $tiny->getConfig();
        $js =<<<JS
		<script language="javascript" type="text/javascript">
		var df = '{$locale->getPrecedentPreference('default_date_format')}';

    		theme : "advanced",
    		theme_advanced_toolbar_align : "left",
    		mode: "exact",
			elements : "stage_dynamic_text",
			theme_advanced_toolbar_location : "top",
			theme_advanced_buttons1: "code,help,separator,bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,forecolor,backcolor,separator,styleprops,styleselect,formatselect,fontselect,fontsizeselect",
			theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,selectall,separator,search,replace,separator,bullist,numlist,separator,outdent,indent,separator,ltr,rtl,separator,undo,redo,separator, link,unlink,anchor,image,separator,sub,sup,separator,charmap,visualaid",
			theme_advanced_buttons3: "tablecontrols,separator,advhr,hr,removeformat,separator,insertdate,pagebreak",
			theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Helvetica Neu=helveticaneue,sans-serif;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",
			plugins : "advhr,table,paste,searchreplace,directionality,style",
			width: "100%",
			inline_styles : true,
			directionality : "ltr",
			remove_redundant_brs : true,
			entity_encoding: 'raw',
			cleanup_on_startup : true,
			strict_loading_mode : true,
			convert_urls : false,
			extended_valid_elements : "textblock",
			custom_elements: "textblock",


        echo $js;

and call this function like this

 function display(){

That’s it.
Note one thing in elements : “stage_dynamic_text” index you can define your field name. Like if your field name is “my_field_name”
So you can include it like *elements : “my_field_name”

Hope you will get the idea about how to do it.

Thanka a lot

1 Like

going to roll back to a previous back up and redo the upgrade.