From be99882cc711f58112223965a953eb12d05de3e9 Mon Sep 17 00:00:00 2001 From: bnu Date: Fri, 12 Jun 2009 03:03:29 +0000 Subject: [PATCH] =?UTF-8?q?r6506,=20r6517=20*=20=EC=97=90=EB=94=94?= =?UTF-8?q?=ED=84=B0=20=EA=B8=B0=EB=B3=B8=20=EA=B0=92(P,BR)=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=9D=B8=ED=95=B4=20=EB=82=B4=EC=9A=A9=20=EC=97=86?= =?UTF-8?q?=EC=9D=B4=20=EB=93=B1=EB=A1=9D=EB=90=98=EB=8A=94=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=EC=88=98=EC=A0=95=20=20=20*=20P,=20BR,=20SPAN,=20D?= =?UTF-8?q?IV,=20 =20=EC=A0=9C=EA=B1=B0=20=ED=9B=84=20=EA=B2=80?= =?UTF-8?q?=EC=82=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6526 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- .../skins/xpresseditor/js/xe_interface.js | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/modules/editor/skins/xpresseditor/js/xe_interface.js b/modules/editor/skins/xpresseditor/js/xe_interface.js index 67c144ad4..e5a85f93f 100644 --- a/modules/editor/skins/xpresseditor/js/xe_interface.js +++ b/modules/editor/skins/xpresseditor/js/xe_interface.js @@ -23,7 +23,7 @@ function editorStart_xe(editor_sequence, primary_key, content_key, editor_height jQuery("#xpress-editor-"+editor_sequence).val(saved_content); } - /* + /* // remove procFilter if(form.comment_srl){ form.onsubmit=function(){ @@ -137,17 +137,17 @@ function editorStart_xe(editor_sequence, primary_key, content_key, editor_height } function load_proc() { - try { - var doc = oWYSIWYGIFrame.contentWindow.document, str; - if (doc.location == 'about:blank') throw 'blank'; - - // get innerHTML - str = doc.body.innerHTML; - - // register plugin - oEditor.registerPlugin(new xe.XE_EditingArea_WYSIWYG(oWYSIWYGIFrame)); - oEditor.registerPlugin(new xe.XpressRangeManager(oWYSIWYGIFrame)); - oEditor.registerPlugin(new xe.XE_ExecCommand(oWYSIWYGIFrame)); + try { + var doc = oWYSIWYGIFrame.contentWindow.document, str; + if (doc.location == 'about:blank') throw 'blank'; + + // get innerHTML + str = doc.body.innerHTML; + + // register plugin + oEditor.registerPlugin(new xe.XE_EditingArea_WYSIWYG(oWYSIWYGIFrame)); + oEditor.registerPlugin(new xe.XpressRangeManager(oWYSIWYGIFrame)); + oEditor.registerPlugin(new xe.XE_ExecCommand(oWYSIWYGIFrame)); if(content_font && !doc.body.style.fontFamily) { doc.body.style.fontFamily = content_font; @@ -155,14 +155,14 @@ function editorStart_xe(editor_sequence, primary_key, content_key, editor_height if(content_font_size && !doc.body.style.fontSize) { doc.body.style.fontSize = content_font_size; } - - // run - oEditor.run(); - } catch(e) { - setTimeout(load_proc, 0); - } + + // run + oEditor.run(); + } catch(e) { + setTimeout(load_proc, 0); + } } - + load_proc(); return oEditor; @@ -173,7 +173,10 @@ function editorGetContentTextarea_xe(editor_sequence) { if (!oEditor) return ''; - return oEditor.getIR(); + var str = oEditor.getIR(); + if(!jQuery.trim(str.replace(/( |<\/?(p|br|span|div)([^>]+)?>)/ig, ''))) return ''; + + return str; } function editorGetIframe(srl) { @@ -206,7 +209,7 @@ xe.XE_GET_WYSYWYG_MODE = jQuery.Class({ } }); -// 이미지등의 상대경로를 절대경로로 바꾸는 플러그인 +// 이미지등의 상대경로를 절대경로로 바꾸는 플러그인 xe.XE_GET_WYSYWYG_CONTENT = jQuery.Class({ name : "XE_GET_WYSYWYG_CONTENT",