tmpArray = arGlobalToolbar.slice(0, cutID).concat([arButtons['BlogCUT']]); arGlobalToolbar = tmpArray.concat(arGlobalToolbar.slice(cutID)); } //--> </script> <?php } AddEventHandler("fileman", "OnIncludeHTMLEditorScript", "CustomizeEditorForBlog"); ?> <script> jsUtils.addCustomEvent('EditorLoadFinish_POST_MESSAGE_HTML', BXBlogSetEditorContent); </script> <?php CFileman::ShowHTMLEditControl("POST_MESSAGE_HTML", $arResult["PostToShow"]["~DETAIL_TEXT"], array("site" => SITE_ID, "templateID" => "", "bUseOnlyDefinedStyles" => "N", "bWithoutPHP" => true, "arToolbars" => array("manage", "standart", "style", "formating", "source", "table"), "arTaskbars" => array("BXPropertiesTaskbar"), "sBackUrl" => "", "fullscreen" => false, "path" => "", "limit_php_access" => true, 'height' => '490', 'width' => '100%', 'light_mode' => true)); } else { ShowError(GetMessage("FILEMAN_MODULE_NOT_INSTALL")); } die; } else { include $_SERVER["DOCUMENT_ROOT"] . $templateFolder . "/script.php"; if ($arResult["preview"] == "Y" && !empty($arResult["PostToShow"]) > 0) { echo "<span class=\"blogtext\"><b>" . GetMessage("BLOG_PREVIEW_TITLE") . "</b></span>"; ?> <table class="blog-table-post"> <tr> <th nowrap width="100%"> <table width="100%" cellspacing="0" cellpadding="0" border="0" class="blog-table-post-table"> <tr> <td align="left">
function AddHTMLEditorFrame($strTextFieldName, $strTextValue, $strTextTypeFieldName, $strTextTypeValue, $arSize = array("height" => 350), $CONVERT_FOR_WORKFLOW = "N", $WORKFLOW_DOCUMENT_ID = 0, $NEW_DOCUMENT_PATH = "", $textarea_field = "", $site = false, $bWithoutPHP = true, $arTaskbars = false, $arAdditionalParams = array()) { // We have to avoid of showing HTML-editor with probably unsecure content when loosing the session [mantis:#0007986] if ($_SERVER["REQUEST_METHOD"] == "POST" && !check_bitrix_sessid()) { return; } global $htmled, $usehtmled; $strTextFieldName = preg_replace("/[^a-zA-Z0-9_:\\.]/is", "", $strTextFieldName); if (is_array($arSize)) { $iHeight = $arSize["height"]; } else { $iHeight = $arSize; } $strTextValue = htmlspecialcharsback($strTextValue); $dontShowTA = isset($arAdditionalParams['dontshowta']) ? $arAdditionalParams['dontshowta'] : false; if ($arAdditionalParams['hideTypeSelector']) { $textType = $strTextTypeValue == 'html' ? 'editor' : 'text'; ?> <input type="hidden" name="<?php echo $strTextTypeFieldName; ?> " value="<?php echo $strTextTypeValue; ?> "/><?php } else { $textType = CFileMan::ShowTypeSelector(array('name' => $strTextFieldName, 'key' => $arAdditionalParams['saveEditorKey'], 'strTextTypeFieldName' => $strTextTypeFieldName, 'strTextTypeValue' => $strTextTypeValue, 'bSave' => $arAdditionalParams['saveEditorState'] !== false)); } $curHTMLEd = $textType == 'editor'; setEditorEventHandlers($strTextFieldName); ?> <textarea class="typearea" style="<?php echo $curHTMLEd || $dontShowTA ? 'display:none;' : ''; ?> width:100%;height:<?php echo $iHeight; ?> px;" name="<?php echo $strTextFieldName; ?> " id="bxed_<?php echo $strTextFieldName; ?> " wrap="virtual" <?php echo $textarea_field; ?> ><?php echo htmlspecialcharsbx($strTextValue); ?> </textarea> <?php if ($bWithoutPHP) { $arTaskbars = array("BXPropertiesTaskbar", "BXSnippetsTaskbar"); } else { if (!$arTaskbars) { $arTaskbars = array("BXPropertiesTaskbar", "BXSnippetsTaskbar", "BXComponents2Taskbar"); } } $minHeight = $arAdditionalParams['minHeight'] ? intval($arAdditionalParams['minHeight']) : 450; $arParams = array("bUseOnlyDefinedStyles" => COption::GetOptionString("fileman", "show_untitled_styles", "N") != "Y", "bFromTextarea" => true, "bDisplay" => $curHTMLEd, "bWithoutPHP" => $bWithoutPHP, "arTaskbars" => $arTaskbars, "height" => max($iHeight, $minHeight)); if (isset($arAdditionalParams['use_editor_3'])) { $arParams['use_editor_3'] = $arAdditionalParams['use_editor_3']; } $arParams['site'] = strlen($site) <= 0 ? LANG : $site; if (isset($arSize["width"])) { $arParams["width"] = $arSize["width"]; } if (isset($arAdditionalParams)) { $arParams["arAdditionalParams"] = $arAdditionalParams; } if (isset($arAdditionalParams['limit_php_access'])) { $arParams['limit_php_access'] = $arAdditionalParams['limit_php_access']; } if (isset($arAdditionalParams['toolbarConfig'])) { $arParams['toolbarConfig'] = $arAdditionalParams['toolbarConfig']; } if (isset($arAdditionalParams['componentFilter'])) { $arParams['componentFilter'] = $arAdditionalParams['componentFilter']; } $arParams['setFocusAfterShow'] = isset($arParams['setFocusAfterShow']) ? $arParams['setFocusAfterShow'] : false; CFileman::ShowHTMLEditControl($strTextFieldName, $strTextValue, $arParams); }
"; FE_MESS.FILEMAN_HTMLED_MANAGE_TB = "<?php echo GetMessage("FILEMAN_HTMLED_MANAGE_TB"); ?> "; window.bEditProps = <?php echo $bEditProps ? 'true' : 'false'; ?> ; var _bEdit = <?php echo $bEdit ? 'true' : 'false'; ?> </script> <?php CFileman::ShowHTMLEditControl("filesrc", $filesrc, array("site" => $site, "templateID" => $templateID, "bUseOnlyDefinedStyles" => COption::GetOptionString("fileman", "show_untitled_styles", "N") != "Y", "bWithoutPHP" => !$USER->CanDoOperation('edit_php'), "toolbarConfig" => CFileman::GetEditorToolbarConfig("filesrc"), "arToolbars" => array("manage", "standart", "style", "formating", "source", "template"), "arTaskbars" => array("BXComponentsTaskbar", "BXComponents2Taskbar", "BXPropertiesTaskbar", "BXSnippetsTaskbar"), "sBackUrl" => $url, "fullscreen" => $bFullScreen == 'Y', "path" => $path, 'width' => '100%', 'height' => '650px', "limit_php_access" => $limit_php_access)); ?> </td></tr> <?php if ($bEditProps) { ?> <?php $tabControl->BeginNextTab(); ?> <tr> <td> <input type="hidden" name="prop_edit" value="Y"> <!-- FILE PROPS --> <script> function _MoreRProps(code, value) {
} })(); </script> <? /* ************* END |HTML EDITOR 3.0| END ************* */ } else { /* ************* OLD HTML EDITOR ************* */ CFileman::ShowHTMLEditControl($editor_name, $filesrc, Array( "site" => $site, "templateID" => $_REQUEST['templateID'], "bUseOnlyDefinedStyles" => COption::GetOptionString("fileman", "show_untitled_styles", "N")!="Y", "bWithoutPHP" => (!$USER->CanDoOperation('edit_php')), "toolbarConfig" => CFileman::GetEditorToolbarConfig($editor_name), "arTaskbars" => Array("BXComponentsTaskbar", "BXComponents2Taskbar", "BXPropertiesTaskbar", "BXSnippetsTaskbar"), "sBackUrl" => $back_url, "path" => $path, "limit_php_access" => $limit_php_access, 'height' => '490', 'width' => '100%', 'light_mode' => true, )); ?> <script> var _bEdit = true; arEditorFastDialogs['asksave'] = function(pObj) { return { title: FX_MESS.EDITOR, innerHTML : "<div style='margin-bottom: 20px; padding: 5px;'>" + FX_MESS.DIALOG_EXIT_ACHTUNG + "</div>",