日期:2014-05-18  浏览次数:20490 次

CKEditor老报错,高手指点一二啊
HTML code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script language="javascript" src="ckeditor/ckeditor.js" type="text/javascript"></script>
<script language="javascript" src="ckfinder/ckfinder.js" type="text/javascript"></script>
<script language="javascript">
/*加载CKEditor*/


    function loadCKEditor1(){
        if (typeof CKEDITOR=='undefined'){
            alert('Editor load failed!');
            return false;
        }else{
            var editor1 = CKEDITOR.replace('editor1');
            CKFinder.SetupCKEditor(editor1,'/ckfinder/');//与ckeditor整合载入ckfinder
        }
    }
    
    window.onload = loadCKEditor1;
</script>
</head>

<body>

<div id="we"></div>
<form id="form1" name="form1" method="post" action="2.asp">
<textarea id="editor1" name="editor1" cols="80" rows="10" ></textarea>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td>&nbsp;</td>
      <td><input type="text" name="names" /></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="text" name="textfield2" /></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="text" name="textfield3" /></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="text" name="textfield4" /></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="text" name="textfield5" /></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="text" name="textfield6" /></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="text" name="textfield7" />
      <input type="submit" name="Submit" value="提交" /></td>
      <td>&nbsp;</td>
    </tr>
  </table>
</form>
</body>
</html>


CKEditor 和 CKFinder 都是在根目录下。

JScript code
CKFinder.SetupCKEditor(editor1,'/ckfinder/');//与ckeditor整合载入ckfinder


这一行报:对象不支持此属性或方法



------解决方案--------------------
第一,看下你web.config里面的配置了没有,配置的路径对不对。
第二,改成CKFinder.SetupCKEditor(editor1,'~/ckfinder/');//与ckeditor整合载入ckfinder
这样看看。
编辑器也就是这些问题了。
------解决方案--------------------
baidu搜索FCK配置,你按照上面那个配置就可以了