CModule::IncludeModule("fileman");
AddEventHandler("fileman", "OnIncludeLightEditorScript", "CustomizeLHEForForum");
$LHE = new CLightHTMLEditor();
$arEditorParams = array(
'id' => "comments",
'content' => '',
'inputName' => "comments",
'inputId' => "",
'width' => "100%",
'height' => "200px",
'minHeight' => "200px",
'bUseFileDialogs' => false,
'bUseMedialib' => false,
'BBCode' => true,
'bBBParseImageSize' => true,
'jsObjName' => "oLHE",
'toolbarConfig' => array(),
'bQuoteFromSelection' => true,
'ctrlEnterHandler' => 'reviewsCtrlEnterHandler',
'bSetDefaultCodeView' => false,
'bResizable' => true,
'bAutoResize' => true,
);
$arEditorFeatures = array(
"ALLOW_BIU" => array('Bold', 'Italic', 'Underline', 'Strike'),
"ALLOW_FONT" => array('ForeColor','FontList', 'FontSizeList'),
"ALLOW_QUOTE" => array('Quote'),
"ALLOW_CODE" => array('Code'),
'ALLOW_ANCHOR' => array('CreateLink', 'DeleteLink'),
"ALLOW_IMG" => array('Image'),
"ALLOW_VIDEO" => array('ForumVideo'),
"ALLOW_TABLE" => array('Table'),
"ALLOW_LIST" => array('InsertOrderedList', 'InsertUnorderedList'),
"ALLOW_UPLOAD" => array(''),
"ALLOW_NL2BR" => array(''),
);
foreach ($arEditorFeatures as $featureName => $toolbarIcons)
$arEditorParams['toolbarConfig'] = array_merge($arEditorParams['toolbarConfig'], $toolbarIcons);
$arEditorParams['toolbarConfig'] = array_merge($arEditorParams['toolbarConfig'], array('RemoveFormat', 'Translit', 'Source'));
?>
<fo rm method="POST" action="">
<?
$LHE->Show($arEditorParams);
?>
<input type="s ubmit" value="otpravit">
</form>
|