rhymix/modules/editor/tpl/editor_module_config.html
Min-Soo Kim e7cb5ede82
에디터 스타일과 기본 스타일의 합병
* 기본 에디터 스타일과 기본 스타일 설정이 충돌하는 경우가 많았습니다.
 - 기본 스타일을 지정했는데, 기본 에디터 스타일 내의 스타일 지정이 있는 경우 반영이 안되는 경우, 또는 기본 에디터 스타일을 변경했는데 기본 스타일 설정 때문에 반영이 적절하게 되지 않는 경우 등.
* 기본 에디터 스타일에서도 less 또는 sass를 사용하도록 하고 싶었지만, 위지윅 에디터에서 본문에 나타날 스타일을 그대로 보여주는데 한계가 있었습니다.
 - 기본 에디터 스타일을 위지윅 에디터 내에서 나타내기 위해서 변칙적인 방법이 많이 활용되었습니다. 때문에 실제 본문에서 적용되는 스타일 시트의 우선순위와 위지윅 에디터 내에서 적용되는 스타일 시트의 우선순위에 차이가 있었습니다. 이 차이는 실제 보여지는 스타일과 작성하는 에디터 내의 스타일 차이를 크게 만들 가능성이 있었습니다.
* 기능의 의미가 많이 퇴색되었고, 의미 전달이 명확하지 않은 기능이었습니다.
 - 기능상 기본 에디터 스타일과 기본 스타일은 서로 겹치는 영역의 기능입니다. 기본으로 포함된 두 에디터 스타일 간에 차이가 크지 않기도 해서 어떤 기능인지 사용자가 알아채기도 어려웠습니다. 자료실에 배포되고 있는 에디터 스타일도 대단히 적었습니다.
* 게시판이나 각 글의 모듈 스킨에서 지정하는 스타일과 충돌할 가능성도 있습니다.

따라서, 에디터 스타일이 의도한 것 처럼 글의 스타일에 대한 관리자 통제 기능은 유지하면서, 다른 기능과 중복되거나 충돌할 수 있는 기능을 정리합니다.
가능한 많은 환경에서 테스트 하였으나, 추가로 이와 관련한 의견이 있을 경우 merge 후에도 계속 반영 해나가겠습니다.
2020-06-16 00:33:19 +09:00

143 lines
No EOL
8 KiB
HTML

<!--%import("filter/insert_editor_module_config.xml")-->
<load target="js/editor_module_config.js" />
<form action="./" method="post" class="section">
<input type="hidden" name="act" value="procEditorInsertModuleConfig" />
<input type="hidden" name="module" value="editor" />
<input type="hidden" name="target_module_srl" value="{$module_info->module_srl?$module_info->module_srl:$module_srls}" />
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
<input type="hidden" name="xe_validator_id" value="modules/editor/addition_setup/1" />
<h1>{$lang->editor}</h1>
<table class="x_table x_table-striped x_table-hover">
<thead>
<tr>
<th scope="col" style="width:160px">&nbsp;</th>
<th scope="col">{$lang->document}</th>
<th scope="col">{$lang->comment}</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row" style="text-align:right">{$lang->default_editor_settings}</th>
<td colspan="2">
<label for="default_editor_settings" class="x_inline">
<input type="checkbox" value="Y" id="default_editor_settings" name="default_editor_settings" checked="checked"|cond="$editor_config->default_editor_settings!=='N'" />
{$lang->about_default_editor_settings}
</label>
</td>
</tr>
<tr class="editor_skin">
<th scope="row" style="text-align:right">{$lang->editor_skin}</th>
<td>
<select name="editor_skin" onchange="getEditorSkinColorList(this.value, null, 'document')">
<option loop="$editor_skin_list => $editor" value="{$editor}" selected="selected"|cond="$editor==$editor_config->editor_skin">{$editor}</option>
</select>
<br/>
<select name="sel_editor_colorset" id="sel_editor_colorset" data-display="none"|cond="!count($editor_colorset_list)">
<option loop="$editor_colorset_list => $key, $val" value="{$val->name}" selected="selected"|cond="$editor_config->sel_editor_colorset == $val->name">{$val->title}</option>
</select>
</td>
<td>
<select name="comment_editor_skin" onchange="getEditorSkinColorList(this.value, null, 'comment')">
<option loop="$editor_skin_list => $editor" value="{$editor}" selected="selected"|cond="$editor==$editor_config->comment_editor_skin">{$editor}</option>
</select>
<br/>
<select name="sel_comment_editor_colorset" id="sel_comment_editor_colorset" data-display="none"|cond="!count($editor_comment_colorset_list)">
<option loop="$editor_comment_colorset_list => $key, $val" value="{$val->name}" selected="selected"|cond="$editor_config->sel_comment_editor_colorset == $val->name">{$val->title}</option>
</select>
</td>
</tr>
<tr class="editor_skin">
<th scope="row" style="text-align:right">{$lang->editor_height}</th>
<td>
<input type="number" min="0" name="editor_height" value="{$editor_config->editor_height}" /> px
</td>
<td>
<input type="number" min="0" name="comment_editor_height" value="{$editor_config->comment_editor_height}" /> px
</td>
</tr>
<tr class="editor_skin">
<th scope="row" style="text-align:right"><label for="content_font">{$lang->content_font}</label></th>
<td colspan="2">
<input type="text" name="content_font" id="content_font" value="{str_replace(array('"','\''),'',$editor_config->content_font)}" placeholder="Ex) Tahoma, Geneva, sans-serif" />
{$lang->about_content_font}
</td>
</tr>
<tr class="editor_skin">
<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 class="editor_skin">
<th scope="row" style="text-align:right">{$lang->enable_autosave}</th>
<td colspan="2">
<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 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>
<label class="x_inline"><input type="radio" name="allow_html" value="N" checked="checked"|cond="$editor_config->allow_html == 'N'" /> {$lang->cmd_no}</label>
</td>
</tr>
<tr>
<th scope="row" style="text-align:right">{$lang->enable_html_grant}</th>
<td>
<label loop="$group_list => $k, $v" for="enable_html_{$k}" class="x_inline"><input type="checkbox" name="enable_html_grant[]" value="{$k}" id="enable_html_{$k}" checked="checked"|cond="in_array($k, $editor_config->enable_html_grant)" /> {$v->title}</label>
</td>
<td>
<label loop="$group_list => $k, $v" for="enable_comment_html_{$k}" class="x_inline"><input type="checkbox" name="enable_comment_html_grant[]" value="{$k}" id="enable_comment_html_{$k}" checked="checked"|cond="in_array($k, $editor_config->enable_comment_html_grant)" /> {$v->title}</label>
</td>
</tr>
<tr>
<th scope="row" style="text-align:right">{$lang->upload_file_grant}</th>
<td>
<label loop="$group_list => $k, $v" for="fileupload_{$k}" class="x_inline"><input type="checkbox" name="upload_file_grant[]" value="{$k}" id="fileupload_{$k}" checked="checked"|cond="in_array($k, $editor_config->upload_file_grant)" /> {$v->title}</label>
</td>
<td>
<label loop="$group_list => $k, $v" for="comment_fileupload_{$k}" class="x_inline"><input type="checkbox" name="comment_upload_file_grant[]" value="{$k}" id="comment_fileupload_{$k}" checked="checked"|cond="in_array($k, $editor_config->comment_upload_file_grant)" /> {$v->title}</label>
</td>
</tr>
<tr>
<th scope="row" style="text-align:right">{$lang->enable_default_component_grant}</th>
<td>
<label loop="$group_list => $k, $v" for="default_componen_{$k}" class="x_inline"><input type="checkbox" name="enable_default_component_grant[]" value="{$k}" id="default_componen_{$k}" checked="checked"|cond="in_array($k, $editor_config->enable_default_component_grant)" /> {$v->title}</label>
</td>
<td>
<label loop="$group_list => $k, $v" for="comment_default_component_{$k}" class="x_inline"><input type="checkbox" name="enable_comment_default_component_grant[]" value="{$k}" id="comment_default_component_{$k}" checked="checked"|cond="in_array($k, $editor_config->enable_comment_default_component_grant)" /> {$v->title}</label>
</td>
</tr>
<tr>
<th scope="row" style="text-align:right">{$lang->enable_extra_component_grant}</th>
<td>
<label loop="$group_list => $k, $v" for="componen_{$k}" class="x_inline"><input type="checkbox" name="enable_component_grant[]" value="{$k}" id="componen_{$k}" checked="checked"|cond="in_array($k, $editor_config->enable_component_grant)" /> {$v->title}</label>
</td>
<td>
<label loop="$group_list => $k, $v" for="comment_component_{$k}" class="x_inline"><input type="checkbox" name="enable_comment_component_grant[]" value="{$k}" id="comment_component_{$k}" checked="checked"|cond="in_array($k, $editor_config->enable_comment_component_grant)" /> {$v->title}</label>
</td>
</tr>
</tbody>
</table>
<div class="x_clearfix">
<button class="x_btn x_btn-primary x_pull-right" type="submit">{$lang->cmd_save}</button>
</div>
</form>
<script>
jQuery(function($){
var editor_skiin_module_cfg = $('tr.editor_skin');
if($('#default_editor_settings').prop( 'checked' ))
{
editor_skiin_module_cfg.hide();
}
$('#default_editor_settings').change(function(){
if($(this).prop( 'checked' )){
editor_skiin_module_cfg.slideUp(200);
} else {
editor_skiin_module_cfg.slideDown(200);
}
});
});
</script>