mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 19:51:42 +09:00
에디터 모듈에 HTML 허용 설정 추가
회원 모듈에도 no html 서명을 위한 옵션 추가
This commit is contained in:
parent
f7915f8204
commit
da0ad3bd39
20 changed files with 179 additions and 142 deletions
|
|
@ -147,21 +147,21 @@ class editorController extends editor
|
|||
$editor_config->{$key} = explode('|@|', $grant);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$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');
|
||||
if($editor_config->enable_autosave != 'Y') $editor_config->enable_autosave = 'N';
|
||||
|
||||
$editor_config->enable_autosave = Context::get('enable_autosave') ?: 'N';
|
||||
$editor_config->allow_html = Context::get('allow_html') ?: 'Y';
|
||||
|
||||
$oModuleController = getController('module');
|
||||
foreach ($module_srl as $srl)
|
||||
{
|
||||
$oModuleController->insertModulePartConfig('editor',$srl,$editor_config);
|
||||
$oModuleController->insertModulePartConfig('editor', $srl, $editor_config);
|
||||
}
|
||||
|
||||
|
||||
$this->setError(-1);
|
||||
$this->setMessage('success_updated', 'info');
|
||||
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispBoardAdminContent');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@ class editorModel extends editor
|
|||
}
|
||||
|
||||
// Fill in some other values.
|
||||
if($editor_config->enable_autosave != 'N') $editor_config->enable_autosave = 'Y';
|
||||
$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();
|
||||
|
|
@ -252,6 +253,9 @@ class editorModel extends editor
|
|||
}
|
||||
Context::set('enable_autosave', $option->enable_autosave);
|
||||
|
||||
// Set allow html
|
||||
Context::set('allow_html', ($option->allow_html === false || $option->allow_html === 'N') ? false : true);
|
||||
|
||||
// Load editor components.
|
||||
$site_srl = Context::get('site_module_info')->site_srl ?: 0;
|
||||
if($option->editor_skin === 'dreditor')
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ $lang->enable_default_component_grant = 'Permission to use default components';
|
|||
$lang->enable_extra_component_grant = 'Permission to use extra components';
|
||||
$lang->enable_html_grant = 'Permission to edit HTML';
|
||||
$lang->enable_autosave = 'Enable Auto-Save';
|
||||
$lang->allow_html = 'allow HTML';
|
||||
$lang->height_resizable = 'Height Resizable';
|
||||
$lang->editor_height = 'Height of Editor';
|
||||
$lang->about_default_editor_settings = 'Follow editor settings of Rhymix Admin page through whole site.';
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ $lang->enable_default_component_grant = '기본 컴포넌트 사용 권한';
|
|||
$lang->enable_extra_component_grant = '확장 컴포넌트 사용 권한';
|
||||
$lang->enable_html_grant = 'HTML 편집 권한';
|
||||
$lang->enable_autosave = '자동저장 사용';
|
||||
$lang->allow_html = 'HTML 허용';
|
||||
$lang->height_resizable = '높이 조절 가능';
|
||||
$lang->editor_height = '에디터 높이';
|
||||
$lang->about_default_editor_settings = '사이트 전체 에디터 설정을 통일하여서 모듈별 에디터 설정을 단순하게 합니다.';
|
||||
|
|
|
|||
|
|
@ -1,8 +1,3 @@
|
|||
|
||||
.rx_editor_wrapper {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.rx_editor_wrapper .rx_editor_textarea {
|
||||
width: 100%;
|
||||
min-height: 64px;
|
||||
|
|
@ -16,4 +11,5 @@
|
|||
.rx_editor_wrapper .rx_editor_textarea.dark {
|
||||
border-color: #111;
|
||||
background: #333;
|
||||
color: #fff;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,11 @@
|
|||
}
|
||||
|
||||
// Save edited content
|
||||
<!--@if(!$allow_html)-->
|
||||
textarea.on("change", function() {
|
||||
content_input.val(String($(this).val()).escape());
|
||||
});
|
||||
<!--@else-->
|
||||
textarea.on("change", function() {
|
||||
content_input.val("<p>" + String($(this).val()).escape().replace(/\r?\n/g, "</p>\n<p>") + "</p>");
|
||||
});
|
||||
|
|
@ -45,7 +50,7 @@
|
|||
} else {
|
||||
parentform.append('<input type="hidden" name="use_html" value="Y" />');
|
||||
}
|
||||
|
||||
<!--@end-->
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -89,6 +89,13 @@
|
|||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue