에디터 기본 설정에 '자동저장 사용, HTML 허용' 설정 추가

This commit is contained in:
conory 2017-07-13 12:53:37 +09:00
parent 820c725d69
commit a8e0acc6cf
6 changed files with 27 additions and 11 deletions

View file

@ -161,8 +161,8 @@ class editorAdminController extends editor
$config->mobile_comment_editor_toolbar = $configVars->mobile_comment_editor_toolbar;
$config->mobile_comment_editor_toolbar_hide = $configVars->mobile_comment_editor_toolbar_hide === 'Y' ? 'Y' : 'N';
$config->content_style = $configVars->content_style;
$config->sel_editor_colorset= $configVars->sel_editor_colorset;
$config->sel_comment_editor_colorset= $configVars->sel_comment_editor_colorset;
$config->sel_editor_colorset = $configVars->sel_editor_colorset;
$config->sel_comment_editor_colorset = $configVars->sel_comment_editor_colorset;
if ($configVars->font_defined === 'Y')
{
@ -227,6 +227,8 @@ class editorAdminController extends editor
$config->content_paragraph_spacing = ctype_digit($config->content_paragraph_spacing) ? ($config->content_paragraph_spacing . 'px') : $config->content_paragraph_spacing;
$config->content_word_break = $configVars->content_word_break;
$config->content_word_break = in_array($config->content_word_break, array('normal', 'keep-all', 'break-all', 'none')) ? $config->content_word_break : 'normal';
$config->enable_autosave = $configVars->enable_autosave ?: 'Y';
$config->allow_html = $configVars->allow_html ?: 'Y';
$config->autoinsert_image = $configVars->autoinsert_image;
$config->autoinsert_image = in_array($config->autoinsert_image, array('paragraph', 'inline', 'none')) ? $config->autoinsert_image : 'paragraph';

View file

@ -45,6 +45,8 @@ class editor extends ModuleObject
'content_line_height' => '160%',
'content_paragraph_spacing' => '0px',
'content_word_break' => 'normal',
'enable_autosave' => 'Y',
'allow_html' => 'Y',
'autoinsert_image' => 'paragraph',
'additional_css' => array(),
'additional_mobile_css' => array(),

View file

@ -150,7 +150,7 @@ class editorController extends editor
$editor_config->editor_height = (int)Context::get('editor_height');
$editor_config->comment_editor_height = (int)Context::get('comment_editor_height');
$editor_config->enable_autosave = Context::get('enable_autosave') ?: 'N';
$editor_config->enable_autosave = Context::get('enable_autosave') ?: 'Y';
$editor_config->allow_html = Context::get('allow_html') ?: 'Y';
$oModuleController = getController('module');

View file

@ -43,8 +43,6 @@ class editorModel extends editor
}
// Fill in some other values.
$editor_config->enable_autosave = $editor_config->enable_autosave ?: 'Y';
$editor_config->allow_html = $editor_config->allow_html ?: 'Y';
if(!is_array($editor_config->enable_html_grant)) $editor_config->enable_html_grant = array();
if(!is_array($editor_config->enable_comment_html_grant)) $editor_config->enable_comment_html_grant = array();
if(!is_array($editor_config->upload_file_grant)) $editor_config->upload_file_grant = array();

View file

@ -212,6 +212,21 @@
</label>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->enable_autosave}</label>
<div class="x_controls">
<label class="x_inline"><input type="radio" name="enable_autosave" value="Y" checked="checked"|cond="$editor_config->enable_autosave != 'N'" /> {$lang->cmd_yes}</label>
<label class="x_inline"><input type="radio" name="enable_autosave" value="N" checked="checked"|cond="$editor_config->enable_autosave == 'N'" /> {$lang->cmd_no}</label>
<p class="x_help-inline">{$lang->about_enable_autosave}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->allow_html}</label>
<div class="x_controls">
<label class="x_inline"><input type="radio" name="allow_html" value="Y" checked="checked"|cond="$editor_config->allow_html != 'N'" /> {$lang->cmd_yes}</label>
<label class="x_inline"><input type="radio" name="allow_html" value="N" checked="checked"|cond="$editor_config->allow_html == 'N'" /> {$lang->cmd_no}</label>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->guide_choose_autoinsert_image}</label>
<div class="x_controls">

View file

@ -80,16 +80,15 @@
<th scope="row" style="text-align:right"><label for="content_font_size">{$lang->content_font_size}</label></th>
<td colspan="2"><input type="text" name="content_font_size" id="content_font_size" value="{$editor_config->content_font_size}" style="width:50px" /> {$lang->about_content_font_size}</td>
</tr>
<tr>
<tr class="editor_skin">
<th scope="row" style="text-align:right">{$lang->enable_autosave}</th>
<td colspan="2">
<label for="enable_autosave" class="x_inline">
<input type="checkbox" value="Y" id="enable_autosave" name="enable_autosave" checked="checked"|cond="$editor_config->enable_autosave=='Y'" />
{$lang->about_enable_autosave}
</label>
<label class="x_inline"><input type="radio" name="enable_autosave" value="Y" checked="checked"|cond="$editor_config->enable_autosave != 'N'" /> {$lang->cmd_yes}</label>
<label class="x_inline"><input type="radio" name="enable_autosave" value="N" checked="checked"|cond="$editor_config->enable_autosave == 'N'" /> {$lang->cmd_no}</label>
<p class="x_help-inline">{$lang->about_enable_autosave}</p>
</td>
</tr>
<tr>
<tr class="editor_skin">
<th scope="row" style="text-align:right">{$lang->allow_html}</th>
<td colspan="2">
<label class="x_inline"><input type="radio" name="allow_html" value="Y" checked="checked"|cond="$editor_config->allow_html != 'N'" /> {$lang->cmd_yes}</label>