I´m trying to add multiple instances of TinyMCE to a custom module.
So far everything works in Firefox, Chrome, Safari and so forth but of course Internet Explorer is acting out as usual. In IE6 and 7 ( 8 not tested) only the last textarea is populated with the TinyMCE editor.
Here is my "sugarcrm/custom/modulename/metadata/editviewdefs.php"
In the header:
Below:PHP Code:// For TinyMCE use
require_once("include/SugarTinyMCE.php");
// Campo symptoms
$tinySymptoms = new SugarTinyMCE();
$tinySymptoms->FAQConfig['cleanup_on_startup']=true;
$tinySymptomsHtml = $tinySymptoms->getInstance('symptoms');
// Campo description
$tiny = new SugarTinyMCE();
$tiny->FAQConfig['cleanup_on_startup']=true;
$tinyHtml = $tiny->getInstance('description');
// Campo resolution
$tinyResolution = new SugarTinyMCE();
$tinyResolution->FAQConfig['cleanup_on_startup']=true;
$tinyResolutionHtml = $tinyResolution->getInstance('resolution');
And to display correctly in Detailview the "sugarcrm/custom/modulename/metadata/detailviewdefs.php the following is added to the corresponding arrays :PHP Code:5 =>
array (
0 =>
array (
'name' => 'symptoms',
'studio' => 'visible',
'customCode'=>'<textarea id="symptoms" name="symptoms">{$fields.symptoms.value}</textarea>{literal}'. $tinySymptomsHtml . '<script>focus_obj = document.getElementById("symptoms");</script>{/literal}',
'displayParams'=>array('required'=>false,'rows'=>5,'cols'=>60),
'label' => 'LBL_SYMPTOMS',
),
),
6 =>
array (
0 =>
array (
'name' => 'description',
'comment' => 'Full text of the note',
'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),
'label' => 'LBL_DESCRIPTION',
),
),
7 =>
array (
0 =>
array (
'name' => 'resolution',
'studio' => 'visible',
'customCode'=>'<textarea id="resolution" name="resolution">{$fields.resolution.value}</textarea>{literal}'. $tinyResolutionHtml . '<script>focus_obj = document.getElementById("resolution");</script>{/literal}',
'displayParams'=>array('required'=>false,'rows'=>5,'cols'=>60),
'label' => 'LBL_RESOLUTION',
),
As in:PHP Code:'type' => 'HTML',
Any ideas on how to fix that this works in Internet Explorer?PHP Code:array (
'name' => 'description',
'type' => 'HTML',
'comment' => 'Full text of the note',
'label' => 'LBL_DESCRIPTION',
I have tried removing the "," from the last line in the array but that did not change anything.


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks