{@ $tinymce8_colorset = in_array($colorset, array('light', 'dark'), true) ? $colorset : 'auto'; $tinymce8_language = str_replace('jp', 'ja', Context::getLangType()); $tinymce8_font = $content_font ? stripslashes($content_font) : 'default'; $tinymce8_size = $content_font_size ? max(8, intval($content_font_size)) : 13; $tinymce8_fonts = isset($lang->edit->fontlist) ? array_values((array)$lang->edit->fontlist) : array(); $tinymce8_sizes = array(8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 24, 28, 32, 36, 40, 48); $tinymce8_options = array(); $tinymce8_components = array(); } {@ array_unshift($tinymce8_fonts, $tinymce8_font); } {@ $tinymce8_parts = explode(',', $tinymce8_family, 2); $tinymce8_options[] = trim($tinymce8_parts[0]) . '=' . $tinymce8_family; } {@ $tinymce8_sizes[] = $tinymce8_size; sort($tinymce8_sizes); } {@ $tinymce8_components[$tinymce8_key] = $tinymce8_component->title; } {@ $tinymce8_config = array( 'license' => !empty($tinymce8_license) ? $tinymce8_license : 'gpl', 'editorSequence' => (int)$editor_sequence, 'primaryKeyName' => $editor_primary_key_name ? $editor_primary_key_name : 'document_srl', 'contentKeyName' => $editor_content_key_name ? $editor_content_key_name : 'content', 'height' => max(100, (int)$editor_height), 'toolbar' => 'default', 'allowUpload' => (bool)$allow_fileupload, 'allowHtml' => (bool)$html_mode, 'enableAutosave' => (bool)$enable_autosave, 'enableComponent' => (bool)$enable_component, 'enableDefaultComponent' => (bool)$enable_default_component, 'components' => $tinymce8_components, 'colorset' => $tinymce8_colorset, 'language' => $tinymce8_language === 'ko' ? 'ko_KR' : ($tinymce8_language === 'ja' ? 'ja' : 'en'), 'fontFamilyFormats' => implode(';', $tinymce8_options), 'fontSizeFormats' => implode('px ', $tinymce8_sizes) . 'px', 'contentCss' => array(rtrim($content_style_path, '/') . '/editor.css'), 'defaultFont' => $tinymce8_font, 'defaultFontSize' => $tinymce8_size, 'contentFont' => $tinymce8_font === 'default' ? 'inherit' : $tinymce8_font, 'contentFontSize' => $content_font_size ? $content_font_size : '13px', 'moduleSrl' => isset($module_info->module_srl) ? (int)$module_info->module_srl : 0, 'uploadTargetSrl' => (int)$upload_target_srl, 'mid' => (string)$mid, 'csrfToken' => method_exists('Security', 'getTemplateFormToken') ? Security::getTemplateFormToken() : '', ); $tinymce8_config_json = json_encode($tinymce8_config, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT); }