FCKeditorV2的疑难问题【急!!!!!!】

rczjp 2009-04-17 11:13:26
<FCKeditorV2:fckeditor id="Message" runat="server" height="300px" width="500px" basepath="~/fckeditor/"
toolbarset="tradakFace">
</FCKeditorV2:fckeditor>

怎么在前端判断是否为空呢???
...全文
168 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
wuyq11 2009-04-17
  • 打赏
  • 举报
回复
function getEditorHTMLContents(EditorName)
{
var oEditor = FCKeditorAPI.GetInstance(EditorName);
return(oEditor.GetXHTML(true));
}
获取编辑器中文字内容
function getEditorTextContents(EditorName)
{
var oEditor = FCKeditorAPI.GetInstance(EditorName);
return(oEditor.EditorDocument.body.innerText);
}
参考
rczjp 2009-04-17
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 ojlovecd 的回复:]
JScript codevaroEditor=FCKeditorAPI.GetInstance("<%=Message.ClientID %>") ;if(oEditor.GetXHTML(true).Trim().length==0)
{
alert("不能为空!");
}
[/Quote]你好,我写了好像没有用
JS里以前没有写过这样的写法 不知道怎么写?
tsp860901 2009-04-17
  • 打赏
  • 举报
回复
学习
我姓区不姓区 2009-04-17
  • 打赏
  • 举报
回复

var oEditor = FCKeditorAPI.GetInstance("<%=Message.ClientID %>") ;
if(oEditor.GetXHTML(true).Trim().length == 0)
{
alert("不能为空!");
}
blestcc 2009-04-17
  • 打赏
  • 举报
回复
要看一下最終輸出的瀏覽器的HTML代碼
rczjp 2009-04-17
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 wuyq11 的回复:]
function getEditorHTMLContents(EditorName)
{
var oEditor = FCKeditorAPI.GetInstance(EditorName);
return(oEditor.GetXHTML(true));
}
获取编辑器中文字内容
function getEditorTextContents(EditorName)
{
var oEditor = FCKeditorAPI.GetInstance(EditorName);
return(oEditor.EditorDocument.body.innerText);
}
参考
[/Quote]你好 非常感谢你的提供
不过我使用的这个是控件 好像不是JS写的
怎么判断呢?

111,126

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧