textarea 에디터 스킨 추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3553 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-01-21 09:20:41 +00:00
parent a2855cd75f
commit 805b50e5b5
7 changed files with 61 additions and 4 deletions

View file

@ -305,7 +305,7 @@ function procFilter(fo_obj, filter_func) {
// form문 안에 위지윅 에디터가 세팅되어 있을 경우 에디터의 값과 지정된 content field를 sync
var editor_sequence = fo_obj.getAttribute('editor_sequence');
if(typeof(editor_sequence)!='undefined' && editor_sequence && typeof(editorRelKeys)!='undefined') {
editorRelKeys[editor_sequence]['content'].value = editorGetContent(editor_sequence);
editorRelKeys[editor_sequence]['content'].value = editorGetContent(editor_sequence);
}
filter_func(fo_obj);

View file

@ -267,8 +267,6 @@ Jeong, Chan Myeong 070601~070630
.boardWrite dl.option dd * { vertical-align:middle;}
.boardWrite dl.option dd select { width:8em; font-size:.95em; }
.boardWrite .editor { border-top:1px solid #e0e1db; margin-top:10px;}
.boardWrite .tag { margin-top:10px; margin-left:10px; }
.boardWrite .tag .inputTypeText { width:90%; background:#FFFFFF url(../images/common/iconTag.gif) no-repeat 5px 5px; padding-left:30px;}
.boardWrite .tag .help { vertical-align:middle;}

View file

@ -254,8 +254,10 @@
* @brief 에디터 html을 구해서 return
**/
function getEditor() {
$module_srl = $this->get('module_srl');
if(!$module_srl) $module_srl = Context::get('module_srl');
$oEditorModel = &getModel('editor');
return $oEditorModel->getModuleEditor('comment', $this->get('module_srl'), $this->comment_srl, 'comment_srl', 'content');
return $oEditorModel->getModuleEditor('comment', $module_srl, $this->comment_srl, 'comment_srl', 'content');
}
}

View file

@ -0,0 +1,4 @@
@charset "utf-8";
.xeTextareaEditor {width:100%; }
.xeTextareaEditor textarea { display:block; margin:10px 10px 0 10px; width:90%;}

View file

@ -0,0 +1,19 @@
<!-- 스킨 css 로드 -->
<!--%import("css/editor.css")-->
<!-- 기본 js/언어파일 로드 -->
<!--%import("../../tpl/js/editor_common.js")-->
<!--%import("js/xe_interface.js")-->
<!-- 에디터 활성화 -->
<script type="text/javascript">//<![CDATA[
xAddEventListener(window,'load', function() { editorStartTextarea({$editor_sequence}, "{$editor_content_key_name}", "{$editor_primary_key_name}"); });
//]]></script>
<!-- 에디터 -->
<div class="xeTextareaEditor">
<textarea id="editor_{$editor_sequence}" class="inputTypeText" style="height:{$editor_height}px;" cols="40" rows="10"></textarea>
</div>

View file

@ -0,0 +1,22 @@
function editorStartTextarea(editor_sequence, content_key, primary_key) {
var obj = xGetElementById('editor_'+editor_sequence);
obj.form.setAttribute('editor_sequence', editor_sequence);
xWidth(obj,xWidth(obj.parentNode)-20);
editorRelKeys[editor_sequence] = new Array();
editorRelKeys[editor_sequence]["primary"] = obj.form[primary_key];
editorRelKeys[editor_sequence]["content"] = obj.form[content_key];
editorRelKeys[editor_sequence]["func"] = editorGetContentTextarea;
var content = obj.form[content_key].value;
content = content.replace(/<br([^>]+)>/ig,"");
obj.value = content;
}
function editorGetContentTextarea(editor_sequence) {
var obj = xGetElementById('editor_'+editor_sequence);
var content = obj.value.trim();
content = content.replace(/(\r\n|\n)/g, "<br />$1");
return content;
}

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<skin>
<title xml:lang="ko">제로보드XE textarea 에디터 스킨</title>
<maker email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2008. 1. 21">
<name xml:lang="ko">zero</name>
<description xml:lang="ko">
위지윅에디터가 아닌 가벼운 글 편집을 원할 경우 사용되는 스킨입니다.
에디터컴포넌트나 파일첨부등의 기능이 모두 되지 않고 단순히 글로 된 컨텐츠만 사용할 수 있습니다.
개발 : zero (http://www.zeroboard.com)
</description>
</maker>
</skin>