Hi all,
I am using SugarCRM CE 5.2.0.f on a local XAMPP for windows server.
I followed all the steps and I got a first textarea field working fine with tinyMCE.
Now I need to use tinyMCE in both textarea fields of my module. I replicate what I coded for the first one but only one of two fields works correctly. The fields are description and note.
This is the code of custom/modules/<my module>/metadata/editviewdefs.php:
PHP Code:
// For TinyMCE use
require_once("include/SugarTinyMCE.php");
// Campo description
$tiny = new SugarTinyMCE();
$tiny->defaultConfig['cleanup_on_startup']=true;
$tinyHtml = $tiny->getInstance('description');
// Campo note
$tinyNote = new SugarTinyMCE();
$tinyNote->defaultConfig['cleanup_on_startup']=true;
$tinyNoteHtml = $tinyNote->getInstance('note');
than in the panel array I have putted this code:
PHP Code:
4 =>
array (
0 =>
array(
'name'=>'description',
'label' => 'LBL_DESCRIPTION',
'customCode'=>'<textarea id="description" name="description">{$fields.description.value}</textarea>{literal}'. $tinyHtml . '<script>focus_obj = document.getElementById("description");</script>{/literal}',
'displayParams'=>array('required'=>false,'rows'=>5,'cols'=>60)
),
),
5 =>
array (
0 =>
array (
'name' => 'note',
'label' => 'LBL_NOTE',
'customCode'=>'<textarea id="note" name="note">{$fields.note.value}</textarea>{literal}'. $tinyNoteHtml . '<script>focus_obj = document.getElementById("note");</script>{/literal}',
'displayParams'=>array('required'=>false,'rows'=>5,'cols'=>60)
),
),
Only note is shown as a tinyMCE field, in EditView and DetailView.
Any idea?
There is also an issue on DetailView: I can modifiy the code. I just wanto to show the html, I don't need the tinyMCE toolbar. I can achieve those thing goals?
Thanks.
flymirco
Bookmarks