FCKeditor已经添加了图片,但是还是报内容不得为空!
js方法如下:function commitForm(){ if(/^\s*$/.test((FCKeditorAPI.GetInstance("news.ncontent").EditorDocument.body.innerText))){
     alert("内容不得为空");
     return false;
    }
调用FCKeditor实体:<!-- fckeditor -->
<script type="text/javascript" src="<%=basePath %>fckeditor/fckeditor.js"></script>
<script type="text/javascript">window.onload = function()
{
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
var sBasePath = "<%=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/fckeditor/"%>"
var oFCKeditor = new FCKeditor( 'news.ncontent' ) ;
oFCKeditor.BasePath = sBasePath ;
oFCKeditor.ReplaceTextarea() ;
}
</script>
<!-- end of fvkeditor -->
其中内容(news.ncontent )是一个textarea被FCKeditor替换,提交的时候调用commitForm()方法!
麻烦高人帮忙看下!谢谢