Hi,
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(){
require_once("include/SugarTinyMCE.php");
global $locale;
$tiny = new SugarTinyMCE();
$tinyMCE = $tiny->getConfig();
$js =<<<JS
<script language="javascript" type="text/javascript">
$tinyMCE
var df = '{$locale->getPrecedentPreference('default_date_format')}';
tinyMCE.init({
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",
height:"500",
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",
});
</script>
JS;
echo $js;
}
and call this function like this
function display(){
parent::display();
$this->displayTMCE();
}
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