diff --git a/common/js/xml_js_filter.js b/common/js/xml_js_filter.js index 8a7571b3a..5ef23d42f 100644 --- a/common/js/xml_js_filter.js +++ b/common/js/xml_js_filter.js @@ -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); diff --git a/modules/board/skins/xe_board/css/common.css b/modules/board/skins/xe_board/css/common.css index 85e9546c0..94ba9c437 100644 --- a/modules/board/skins/xe_board/css/common.css +++ b/modules/board/skins/xe_board/css/common.css @@ -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;} diff --git a/modules/comment/comment.item.php b/modules/comment/comment.item.php index 85d6a9182..4ad93b61f 100644 --- a/modules/comment/comment.item.php +++ b/modules/comment/comment.item.php @@ -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'); } } diff --git a/modules/editor/skins/textarea/css/editor.css b/modules/editor/skins/textarea/css/editor.css new file mode 100644 index 000000000..e29fa20c8 --- /dev/null +++ b/modules/editor/skins/textarea/css/editor.css @@ -0,0 +1,4 @@ +@charset "utf-8"; + +.xeTextareaEditor {width:100%; } +.xeTextareaEditor textarea { display:block; margin:10px 10px 0 10px; width:90%;} diff --git a/modules/editor/skins/textarea/editor.html b/modules/editor/skins/textarea/editor.html new file mode 100644 index 000000000..ee11e631d --- /dev/null +++ b/modules/editor/skins/textarea/editor.html @@ -0,0 +1,19 @@ + + + + + + + + + + + + +
+ +
+ + diff --git a/modules/editor/skins/textarea/js/xe_interface.js b/modules/editor/skins/textarea/js/xe_interface.js new file mode 100644 index 000000000..432212f62 --- /dev/null +++ b/modules/editor/skins/textarea/js/xe_interface.js @@ -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(/]+)>/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, "
$1"); + return content; +} diff --git a/modules/editor/skins/textarea/skin.xml b/modules/editor/skins/textarea/skin.xml new file mode 100644 index 000000000..c2b0f9147 --- /dev/null +++ b/modules/editor/skins/textarea/skin.xml @@ -0,0 +1,12 @@ + + + 제로보드XE textarea 에디터 스킨 + + zero + + 위지윅에디터가 아닌 가벼운 글 편집을 원할 경우 사용되는 스킨입니다. + 에디터컴포넌트나 파일첨부등의 기능이 모두 되지 않고 단순히 글로 된 컨텐츠만 사용할 수 있습니다. + 개발 : zero (http://www.zeroboard.com) + + +