From c439448eae17ec7ed2615770258bd27032c2668e Mon Sep 17 00:00:00 2001 From: gnuboard Date: Wed, 9 Jan 2013 18:12:23 +0900 Subject: [PATCH] =?UTF-8?q?=EC=83=81=EC=88=98=20=5FDEFINED=5F=20=EA=B0=80?= =?UTF-8?q?=20=EC=84=A0=EC=96=B8=EB=90=9C=20=EA=B2=BD=EC=9A=B0=EC=97=90?= =?UTF-8?q?=EB=A7=8C=20ckeditor=20=EC=8B=A4=ED=96=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/ckeditor.extend.php | 2 ++ plugin/ckeditor/ckeditor.lib.php | 14 +++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/extend/ckeditor.extend.php b/extend/ckeditor.extend.php index c752f5610..cad9fa117 100644 --- a/extend/ckeditor.extend.php +++ b/extend/ckeditor.extend.php @@ -7,4 +7,6 @@ $editor = (object)array( 'config_js' => $g4['path']."/plugin/ckeditor/config.js", 'data' => "data/editor" ); + +include_once($editor->lib); ?> \ No newline at end of file diff --git a/plugin/ckeditor/ckeditor.lib.php b/plugin/ckeditor/ckeditor.lib.php index 2f2609403..74d9e214b 100644 --- a/plugin/ckeditor/ckeditor.lib.php +++ b/plugin/ckeditor/ckeditor.lib.php @@ -4,19 +4,27 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 function editor_textarea($id, $content="", $class="") { global $g4; - $upload_url = $g4['path']."/plugin/ckeditor/upload.php?type=Images"; + //$upload_url = $g4['path']."/plugin/ckeditor/upload.php?type=Images"; $str = "\n"; //$str .= "\n"; return $str; } +// textarea 로 값을 넘김 function editor_getdata($id) { - return "var {$id}_data = CKEDITOR.instances.{$id}.getData();\n"; + if (defined('_EDITOR_')) + return "var {$id}_data = CKEDITOR.instances.{$id}.getData();\n"; + else + return ""; } +// textarea 의 값이 비어 있는지 검사 function editor_empty($id, $textarea_name="내용을") { - return "if (!{$id}_data) { alert(\"$textarea_name 입력해 주십시오.\"); return false; }\n"; + if (defined('_EDITOR_')) + return "if (!{$id}_data) { alert(\"$textarea_name 입력해 주십시오.\"); return false; }\n"; + else + return ""; } ?> \ No newline at end of file