mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-29 08:09:58 +09:00
textarea 에디터 스킨 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3553 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
a2855cd75f
commit
805b50e5b5
7 changed files with 61 additions and 4 deletions
22
modules/editor/skins/textarea/js/xe_interface.js
Normal file
22
modules/editor/skins/textarea/js/xe_interface.js
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue