第一步,在ckeditor_php5.php中修改:
if (!empty($_config))
$js .= “CKEDITOR.replace(‘”.$name.”‘, “.$this->jsEncode($_config).”);”;
else
$js .= “CKEDITOR.replace(‘”.$name.”‘);”;
if (!empty($_config)) $js .= “var editor=CKEDITOR.replace(‘”.$name.”‘, “.$this->jsEncode($_config).”);”; else $js .= “var editor=CKEDITOR.replace(‘”.$name.”‘);”;
修改成:
if (!empty($_config))
$js .= “var editor=CKEDITOR.replace(‘”.$name.”‘, “.$this->jsEncode($_config).”);”;
else
$js .= “var editor=CKEDITOR.replace(‘”.$name.”‘);”;
第二步:
用下面的方法取值.
editor.document.getBody().getText(); //取得純文本
editor.document.getBody().getHtml(); //取得html文本
摘自 順子網絡 PHP網站建設