编辑区其实就是个textfield。设置为只读不就成了?

解决方案 »

  1.   

    试过了,这样不好用哦,只是textarea只读了,但加载在上面的控件还是可以写内容的
      

  2.   

    那就设置成disabled啊。设置编辑区无效。如果想要用户输入的时候就去掉这个属性。
      

  3.   

    http://blog.csdn.net/hailang43/archive/2009/06/20/4285847.aspx
      

  4.   

    各位所说的都是FCKeditor的,而我所说的是ckeditor,是FCKeditor的下一代了,仍然谢谢大家,但问题还是未解愁!
      

  5.   

    这问题还没解决?!我知道ck是fck的下一代。我给你提供链接有解决办法,你没看吗?
      

  6.   

    //设置fckeditor为只读
       function FCKeditor_OnComplete(editorInstance)
          {
            editorInstance.EditorDocument.body.disabled = true;
            editorInstance.EditorWindow.parent.document.getElementById('xExpanded').style.display = 'none';
            editorInstance.EditorWindow.parent.document.getElementById('xCollapsed').style.display = 'none';
            editorInstance.EditorWindow.blur();
          }<body onload="FCKeditor_OnComplete(content);"><td colspan="4">
    <FCK:editor instanceName="content" height="340px" value="${content}" ></FCK:editor>
    </td>
      

  7.   

    楼上这们兄弟,你是咋引用和定义的?我怎么提示'content'未定义呢?
    而且也没有<FCK:editor ></FCK:editor>这个标签呢?
      

  8.   

    那个只是示例,你要用肯定的稍微改动下,你看你自己的value对应的是什么,并不一定是content,至于为什么没有fck标签是因为你没引入,在页头部分加上这句话:<%@ taglib prefix="FCK" uri="http://java.fckeditor.net"%> 学东西要灵活~
      

  9.   

    仍然非常感谢楼上的哥们,我改用kindeditor了,kindeditor带只读属性!结了