에디터 스킨중 textarea 스킨 제거하고 default스킨에 white_texteditor, black_texteditor 컬러셋을 추가하여 대체

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4801 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-11-07 11:28:24 +00:00
parent 593442dee9
commit 189785a312
8 changed files with 271 additions and 283 deletions

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);
obj.style.width = '99%';
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;
}