mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
에디터 추가 설정시 모듈별로 글의 내용 및 글쓰기시에 기본 글꼴을 지정할 수 있는 기능 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6153 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
714d618523
commit
0b2413bffb
14 changed files with 51 additions and 4 deletions
|
|
@ -81,6 +81,17 @@
|
|||
$editor_config->editor_skin = Context::get('editor_skin');
|
||||
$editor_config->comment_editor_skin = Context::get('comment_editor_skin');
|
||||
$editor_config->content_style = Context::get('content_style');
|
||||
$editor_config->content_font = Context::get('content_font');
|
||||
if($editor_config->content_font) {
|
||||
$font_list = array();
|
||||
$fonts = explode(',',$editor_config->content_font);
|
||||
for($i=0,$c=count($fonts);$i<$c;$i++) {
|
||||
$font = trim(str_replace(array('"','\''),'',$fonts[$i]));
|
||||
if(!$font) continue;
|
||||
$font_list[] = $font;
|
||||
}
|
||||
if(count($font_list)) $editor_config->content_font = '"'.implode('","',$font_list).'"';
|
||||
}
|
||||
$editor_config->sel_editor_colorset = Context::get('sel_editor_colorset');
|
||||
$editor_config->sel_comment_editor_colorset = Context::get('sel_comment_editor_colorset');
|
||||
|
||||
|
|
@ -157,6 +168,8 @@
|
|||
elseif(preg_match('/\.js/i',$file)) Context::addJsFile('./modules/editor/styles/'.$content_style.'/'.$file, false);
|
||||
}
|
||||
}
|
||||
$content_font = $editor_config->content_font;
|
||||
if($content_font) Context::addHtmlHeader('<style type="text/css" charset="UTF-8"> .xe_content { font-family:'.$content_font.'; } </style>');
|
||||
}
|
||||
|
||||
$content = $this->transComponent($content);
|
||||
|
|
|
|||
|
|
@ -70,6 +70,9 @@
|
|||
if(!$option->content_style) $option->content_style = 'xeStyle';
|
||||
Context::set('content_style', $option->content_style);
|
||||
|
||||
// 기본 글꼴 지정
|
||||
Context::set('content_font', $option->content_font);
|
||||
|
||||
// 자동 저장 유무 옵션 설정
|
||||
if(!$option->enable_autosave) $enable_autosave = false;
|
||||
else $enable_autosave = true;
|
||||
|
|
@ -220,6 +223,7 @@
|
|||
if($type == 'document') {
|
||||
$config->editor_skin = $editor_config->editor_skin;
|
||||
$config->content_style = $editor_config->content_style;
|
||||
$config->content_font = $editor_config->content_font;
|
||||
$config->sel_editor_colorset = $editor_config->sel_editor_colorset;
|
||||
$config->upload_file_grant = $editor_config->upload_file_grant;
|
||||
$config->enable_default_component_grant = $editor_config->enable_default_component_grant;
|
||||
|
|
@ -230,6 +234,7 @@
|
|||
} else {
|
||||
$config->editor_skin = $editor_config->comment_editor_skin;
|
||||
$config->content_style = $editor_config->content_style;
|
||||
$config->content_font = $editor_config->content_font;
|
||||
$config->sel_editor_colorset = $editor_config->sel_comment_editor_colorset;
|
||||
$config->upload_file_grant = $editor_config->comment_upload_file_grant;
|
||||
$config->enable_default_component_grant = $editor_config->enable_comment_default_component_grant;
|
||||
|
|
@ -250,6 +255,7 @@
|
|||
// 에디터 옵션 변수를 미리 설정
|
||||
$option->skin = $config->editor_skin;
|
||||
$option->content_style = $config->content_style;
|
||||
$option->content_font = $config->content_font;
|
||||
$option->colorset = $config->sel_editor_colorset;
|
||||
|
||||
// 파일 업로드 권한 체크
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
$lang->component_extra_vars = 'Option Variable';
|
||||
$lang->component_grant = 'Permission Setting';
|
||||
$lang->content_style = 'Content Style';
|
||||
$lang->content_font = 'Content Font';
|
||||
|
||||
$lang->about_component = 'About component';
|
||||
$lang->about_component_grant = 'Selected group(s) will be able to use expanded components of editor.<br />(Leave them blank if you want all groups to have permission)';
|
||||
|
|
@ -43,6 +44,7 @@
|
|||
|
||||
$lang->about_editor_skin = 'You may select the skin of editor.';
|
||||
$lang->about_content_style = '문서 편집 및 내용 출력시 원하는 서식을 지정할 수 있습니다';
|
||||
$lang->about_content_font = '문서 편집 및 내용 출력시 원하는 폰트를 지정할 수 있습니다.<br/>지정하지 않으면 사용자 설정에 따르게 됩니다<br/> ,(콤마)로 여러 폰트를 지정할 수 있습니다.';
|
||||
$lang->about_upload_file_grant = 'Selected group(s) will be able to upload files. (Leave them blank if you want all groups to have permission)';
|
||||
$lang->about_default_component_grant = 'Selected group(s) will be able to use default components of editor. (Leave them blank if you want all groups to have permission)';
|
||||
$lang->about_editor_height = 'You may set the height of editor.';
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
$lang->component_extra_vars = 'Varibles Extras';
|
||||
$lang->component_grant = 'Ajuste de las atribuciones';
|
||||
$lang->content_style = 'Content Style';
|
||||
$lang->content_font = 'Content Font';
|
||||
|
||||
$lang->about_component = 'Presentación del componente';
|
||||
$lang->about_component_grant = 'Usted puede configurar el permiso de utilizar la ampliación de los componentes de editor.<br /> (Todo el mundo tendría permiso si no comprobado)';
|
||||
|
|
@ -43,6 +44,7 @@
|
|||
|
||||
$lang->about_editor_skin = 'Usted puede seleccionar la piel del editor.';
|
||||
$lang->about_content_style = '문서 편집 및 내용 출력시 원하는 서식을 지정할 수 있습니다';
|
||||
$lang->about_content_font = '문서 편집 및 내용 출력시 원하는 폰트를 지정할 수 있습니다.<br/>지정하지 않으면 사용자 설정에 따르게 됩니다<br/> ,(콤마)로 여러 폰트를 지정할 수 있습니다.';
|
||||
$lang->about_upload_file_grant = 'Usted puede configurar el permiso de archivo adjunto. (Todo el mundo tendría permiso si no comprobado)';
|
||||
$lang->about_default_component_grant = 'Usted puede configurar el permiso de uso de los componentes de editor por defecto. (Todo el mundo tendría permiso si no comprobado)';
|
||||
$lang->about_editor_height = 'Usted puede configurar la altura del editor.';
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
$lang->component_extra_vars = 'Variables d\'Option';
|
||||
$lang->component_grant = 'Configuration de la Permission';
|
||||
$lang->content_style = 'Content Style';
|
||||
$lang->content_font = 'Content Font';
|
||||
|
||||
$lang->about_component = 'Sur le Composant';
|
||||
$lang->about_component_grant = 'Vous pouvez configurer la Permission d\'utiliser des composants additionnels de l\'Editeur.<br /> (Tout le monde aura la Permission si vous ne cochez rien)';
|
||||
|
|
@ -43,6 +44,7 @@
|
|||
|
||||
$lang->about_editor_skin = 'Vous pouvez choisir l\'habillage de l\'Editeur.';
|
||||
$lang->about_content_style = '문서 편집 및 내용 출력시 원하는 서식을 지정할 수 있습니다';
|
||||
$lang->about_content_font = '문서 편집 및 내용 출력시 원하는 폰트를 지정할 수 있습니다.<br/>지정하지 않으면 사용자 설정에 따르게 됩니다<br/> ,(콤마)로 여러 폰트를 지정할 수 있습니다.';
|
||||
$lang->about_upload_file_grant = 'Vous pouvez configurer la permission d\'attacher les fichiers. (Tout le monde aura la permission si vous ne cochez rien)';
|
||||
$lang->about_default_component_grant = 'Vous pouvez configurer la permission d\'utiliser les Composants Par Défaut de l\'Editeur. (Tout le monde aura la permission si vous ne cochez rien)';
|
||||
$lang->about_editor_height = 'Vous pouvez configurer l\'hauteur de l\'Editeur.';
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
$lang->component_extra_vars = '設定変数';
|
||||
$lang->component_grant = '権限設定';
|
||||
$lang->content_style = 'Content Style';
|
||||
$lang->content_font = 'Content Font';
|
||||
|
||||
$lang->about_component = 'コンポーネント情報';
|
||||
$lang->about_component_grant = '基本コンポーネント以外の拡張コンポーネント機能が利用可能な権限の設定が出来ます。<br />(選択なしの場合、誰でも利用可能)';
|
||||
|
|
@ -43,6 +44,7 @@
|
|||
|
||||
$lang->about_editor_skin = 'エディターのスキンの選択が出来ます。';
|
||||
$lang->about_content_style = '문서 편집 및 내용 출력시 원하는 서식을 지정할 수 있습니다';
|
||||
$lang->about_content_font = '문서 편집 및 내용 출력시 원하는 폰트를 지정할 수 있습니다.<br/>지정하지 않으면 사용자 설정에 따르게 됩니다<br/> ,(콤마)로 여러 폰트를 지정할 수 있습니다.';
|
||||
$lang->about_upload_file_grant = 'ファイル添付可能な権限の設定が出来ます。(選択なしの場合、誰でも添付が可能)';
|
||||
$lang->about_default_component_grant = 'エディターでの基本コンポーネントを使用可能な権限の設定が出来ます。(選択なしの場合、誰でも利用可能)';
|
||||
$lang->about_editor_height = 'エディターの基本高さを設定します。';
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
$lang->component_extra_vars = '설정 변수';
|
||||
$lang->component_grant = '권한설정';
|
||||
$lang->content_style = '문서 서식';
|
||||
$lang->content_font = '문서 폰트';
|
||||
|
||||
$lang->about_component = '컴포넌트 소개';
|
||||
$lang->about_component_grant = '기본 컴포넌트외의 확장 컴포넌트 기능을 사용할 수 있는 권한을 지정할 수 있습니다.<br /> (모두 해제시 아무나 사용 가능합니다)';
|
||||
|
|
@ -43,6 +44,7 @@
|
|||
|
||||
$lang->about_editor_skin = '에디터 스킨을 선택하실 수 있습니다';
|
||||
$lang->about_content_style = '문서 편집 및 내용 출력시 원하는 서식을 지정할 수 있습니다';
|
||||
$lang->about_content_font = '문서 편집 및 내용 출력시 원하는 폰트를 지정할 수 있습니다.<br/>지정하지 않으면 사용자 설정에 따르게 됩니다<br/> ,(콤마)로 여러 폰트를 지정할 수 있습니다.';
|
||||
$lang->about_upload_file_grant = '파일을 첨부할 수 있는 권한을 지정하실 수 있습니다. (모두 해제 시 아무나 첨부 가능합니다)';
|
||||
$lang->about_default_component_grant = '에디터에서 사용되는 기본 컴포넌트를 사용할 수 있는 권한을 지정할 수 있습니다. (모두 해제 시 아무나 사용 가능합니다)';
|
||||
$lang->about_editor_height = '에디터의 기본 높이를 지정하실 수 있습니다.';
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
$lang->component_extra_vars = 'Экстра перем.';
|
||||
$lang->component_grant = 'Настройки прав доступа';
|
||||
$lang->content_style = 'Content Style';
|
||||
$lang->content_font = 'Content Font';
|
||||
|
||||
$lang->about_component = 'О компоненте';
|
||||
$lang->about_component_grant = 'Только выбранным группам позволено использование.<br /> (Каждый может использовать его, если режим выключен)';
|
||||
|
|
@ -43,6 +44,7 @@
|
|||
|
||||
$lang->about_editor_skin = '에디터 스킨을 선택하실 수 있습니다';
|
||||
$lang->about_content_style = '문서 편집 및 내용 출력시 원하는 서식을 지정할 수 있습니다';
|
||||
$lang->about_content_font = '문서 편집 및 내용 출력시 원하는 폰트를 지정할 수 있습니다.<br/>지정하지 않으면 사용자 설정에 따르게 됩니다<br/> ,(콤마)로 여러 폰트를 지정할 수 있습니다.';
|
||||
$lang->about_upload_file_grant = '파일을 첨부할 수 있는 권한을 지정하실 수 있습니다 (모두 해제시 아무나 첨부 가능합니다)';
|
||||
$lang->about_default_component_grant = '에디터에서 사용되는 기본 컴포넌트를 사용할 수 있는 권한을 지정할 수 있습니다. (모두 해제시 아무나 사용 가능합니다)';
|
||||
$lang->about_editor_height = '에디터의 기본 높이를 지정하실 수 있습니다';
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
$lang->component_extra_vars = '变数设置';
|
||||
$lang->component_grant = '权限设置';
|
||||
$lang->content_style = 'Content Style';
|
||||
$lang->content_font = 'Content Font';
|
||||
|
||||
$lang->about_component = '组件简介';
|
||||
$lang->about_component_grant = '可以设置除默认组件外的扩展组件使用权限<br />(全部解除时任何用户都可以使用)。';
|
||||
|
|
@ -43,6 +44,7 @@
|
|||
|
||||
$lang->about_editor_skin = '可以选择编辑器皮肤。';
|
||||
$lang->about_content_style = '문서 편집 및 내용 출력시 원하는 서식을 지정할 수 있습니다';
|
||||
$lang->about_content_font = '문서 편집 및 내용 출력시 원하는 폰트를 지정할 수 있습니다.<br/>지정하지 않으면 사용자 설정에 따르게 됩니다<br/> ,(콤마)로 여러 폰트를 지정할 수 있습니다.';
|
||||
$lang->about_upload_file_grant = '可以设置上传文件的权限(全部解除为无限制)。';
|
||||
$lang->about_default_component_grant = '可以设置编辑器默认组件的使用权限(全部解除为无限制)。';
|
||||
$lang->about_editor_height = '可以指定编辑器的默认高度。';
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
$lang->component_extra_vars = '變數設置';
|
||||
$lang->component_grant = '權限設置';
|
||||
$lang->content_style = 'Content Style';
|
||||
$lang->content_font = 'Content Font';
|
||||
|
||||
$lang->about_component = '組件簡介';
|
||||
$lang->about_component_grant = '除預設組件外,可設置延伸組件的使用權限<br />(全部解除時,任何用戶都可使用)。';
|
||||
|
|
@ -43,6 +44,7 @@
|
|||
|
||||
$lang->about_editor_skin = '選擇編輯器面板。';
|
||||
$lang->about_content_style = '문서 편집 및 내용 출력시 원하는 서식을 지정할 수 있습니다';
|
||||
$lang->about_content_font = '문서 편집 및 내용 출력시 원하는 폰트를 지정할 수 있습니다.<br/>지정하지 않으면 사용자 설정에 따르게 됩니다<br/> ,(콤마)로 여러 폰트를 지정할 수 있습니다.';
|
||||
$lang->about_upload_file_grant = '設置上傳檔案的權限(全部解除為無限制)。';
|
||||
$lang->about_default_component_grant = '設置編輯器預設組件的使用權限(全部解除為無限制)。';
|
||||
$lang->about_editor_height = '指定編輯器的預設高度。';
|
||||
|
|
|
|||
|
|
@ -509,12 +509,11 @@
|
|||
</div>
|
||||
<!--@end-->
|
||||
</div>
|
||||
|
||||
<!-- 에디터 활성화 -->
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
var editor_path = "{$editor_path}";
|
||||
var auto_saved_msg = "{$lang->msg_auto_saved}";
|
||||
var oEditor = editorStart_xe("{$editor_sequence}", "{$editor_primary_key_name}", "{$editor_content_key_name}", "{$editor_height}", "{$colorset}", "{$content_style}");
|
||||
var oEditor = editorStart_xe("{$editor_sequence}", "{$editor_primary_key_name}", "{$editor_content_key_name}", "{$editor_height}", "{$colorset}", "{$content_style}",'{$content_font}');
|
||||
//]]></script>
|
||||
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@ if (!window.xe) xe = {};
|
|||
|
||||
xe.Editors = [];
|
||||
|
||||
function editorStart_xe(editor_sequence, primary_key, content_key, editor_height, colorset, content_style) {
|
||||
function editorStart_xe(editor_sequence, primary_key, content_key, editor_height, colorset, content_style, content_font) {
|
||||
if(typeof(colorset)=='undefined') colorset = 'white';
|
||||
if(typeof(content_style)=='undefined') content_style = 'xeStyle';
|
||||
if(typeof(content_font)=='undefined') content_font= '';
|
||||
|
||||
var target_src = request_uri+'modules/editor/styles/'+content_style+'/editor.html';
|
||||
|
||||
|
|
@ -140,6 +141,10 @@ function editorStart_xe(editor_sequence, primary_key, content_key, editor_height
|
|||
oEditor.registerPlugin(new xe.XE_EditingArea_WYSIWYG(oWYSIWYGIFrame));
|
||||
oEditor.registerPlugin(new xe.XpressRangeManager(oWYSIWYGIFrame));
|
||||
oEditor.registerPlugin(new xe.XE_ExecCommand(oWYSIWYGIFrame));
|
||||
|
||||
if(content_font && !doc.body.style.fontFamily) {
|
||||
doc.body.style.fontFamily = content_font;
|
||||
}
|
||||
|
||||
// run
|
||||
oEditor.run();
|
||||
|
|
|
|||
|
|
@ -56,6 +56,15 @@
|
|||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2"><div>{$lang->content_font}</div></th>
|
||||
<td colspan="2"><p>{$lang->about_content_font}</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="text" name="content_font" value="{str_replace(array('"','\''),'',$editor_config->content_font)}" class="inputTypeText w400" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2"><div>{$lang->editor_height}</div></th>
|
||||
<td colspan="2"><p>{$lang->about_editor_height}</p></td>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
<form action="./" method="post" onsubmit="return procFilter(this, insert_board)" enctype="multipart/form-data">
|
||||
<input type="hidden" name="module_srl" value="{$module_info->module_srl}" />
|
||||
<input type="hidden" name="is_default" value="N" />
|
||||
<input type="hidden" name="mid" value="{$module_info->mid}" />
|
||||
<input type="hidden" name="layout_srl" value="{$module_info->layout_srl}" />
|
||||
<input type="hidden" name="browser_title" value="{htmlspecialchars($module_info->browser_title)}" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue