mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-25 14:19:58 +09:00
#17620466 스킨에서 정하게
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5291 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b561c21b47
commit
34819438c7
3 changed files with 93 additions and 62 deletions
|
|
@ -1,5 +1,6 @@
|
|||
function editorStartTextarea(editor_sequence, content_key, primary_key) {
|
||||
var obj = xGetElementById('editor_'+editor_sequence);
|
||||
var use_html = xGetElementById('htm_'+editor_sequence).value;
|
||||
obj.form.setAttribute('editor_sequence', editor_sequence);
|
||||
|
||||
obj.style.width = '99%';
|
||||
|
|
@ -10,13 +11,26 @@ function editorStartTextarea(editor_sequence, content_key, primary_key) {
|
|||
editorRelKeys[editor_sequence]["func"] = editorGetContentTextarea;
|
||||
|
||||
var content = obj.form[content_key].value;
|
||||
content = content.replace(/<br([^>]*)>/ig,"\n");
|
||||
if(use_html=='n') {
|
||||
content = content.replace(/<br([^>]*)>/ig,"\n");
|
||||
content = content.replace(/</g, "<");
|
||||
content = content.replace(/>/g, ">");
|
||||
content = content.replace(/"/g, '"');
|
||||
content = content.replace(/&/g, "&");
|
||||
}
|
||||
obj.value = content;
|
||||
}
|
||||
|
||||
function editorGetContentTextarea(editor_sequence) {
|
||||
var obj = xGetElementById('editor_'+editor_sequence);
|
||||
var use_html = xGetElementById('htm_'+editor_sequence).value;
|
||||
var content = obj.value.trim();
|
||||
content = content.replace(/(\r\n|\n)/g, "<br />$1");
|
||||
if(use_html=='n') {
|
||||
content = content.replace(/&/g, "&");
|
||||
content = content.replace(/</g, "<");
|
||||
content = content.replace(/>/g, ">");
|
||||
content = content.replace(/\"/g, """);
|
||||
content = content.replace(/(\r\n|\n)/g, "<br />");
|
||||
}
|
||||
return content;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue