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

@ -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>