|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /home/queenjbs/xe/modules/editor/skins/xpresseditor/js/ |
Upload File : |
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%';
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;
if(use_html) {
content = content.replace(/<br([^>]*)>/ig,"\n");
if(use_html!='br') {
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();
if(use_html) {
if(use_html!='br') {
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;
}