if (CModule::IncludeModule("fileman")) {
$id = preg_replace("/[^a-z0-9]/i", '', $name);
ob_start();
echo '<input type="hidden" name="' . $name . '[TYPE]" value="html">';
$LHE = new CLightHTMLEditor;
$LHE->Show(array(
'id' => $id,
'width' => '100%',
'height' => '400px',
'inputName' => $name,
'content' => htmlspecialchars_decode($value),
'bUseFileDialogs' => false,
'bFloatingToolbar' => false,
'bArisingToolbar' => false,
'toolbarConfig' => array(
'Bold', 'Italic', 'Underline', 'RemoveFormat',
'CreateLink', 'DeleteLink', 'Image', 'Video',
'BackColor', 'ForeColor',
'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull',
'InsertOrderedList', 'InsertUnorderedList', 'Outdent', 'Indent',
'StyleList', 'HeaderList',
'FontList', 'FontSizeList',
),
));
$s = ob_get_contents();
ob_end_clean();
return $s;
} else {
return <<<ECHO
<textarea name="$name" style="width: 100%; height: 400px;">{$value}</textarea>
ECHO;
} |