本教程主要讲了怎么利用js 来设置编辑器获得焦点获取fck编辑器内容判断是否为空,以及内容长度与js调用fck编辑器的方法。
var checkcontent =fckeditorapi.getinstance("content").getxhtml();
写成函数
function geteditorhtmlcontents(editorname) {
var oeditor = fckeditorapi.getinstance(editorname);
return(oeditor.getxhtml(true));
}
编辑器获得焦点
var oeditor = fckeditorapi.getinstance('content');
oeditor.focus();
写成函数
// 设置编辑器焦点
function seteditorcontents(editorname, contentstr) {
var oeditor = fckeditorapi.getinstance(editorname) ;
oeditor.focus;
}
上面方法简单写
长度验证:
fckeditorapi.getinstance("content").getxhtml().length;
另外还要让编辑器获得焦点:
var oeditor = fckeditorapi.getinstance('content');oeditor.focus();
fckeditor js调用方法
}
//-->
fck推荐下载地址
http://down.111com.net/webedit/2009/0429/fck-dedecms.html
deepin20怎么新增字体? deepin20安装字体的教程
Linux如何给文件权限? linux给文件添加可执行权限的技巧
deepin20桌面图标样式怎么修改? deepin更换图标主题的技巧
virtualbox打不开虚拟机怎么办? linux无法访问virtualbox的解决办法
deepin怎么注销系统? deepin系统注销与切换用户的方法
Manjaro linux怎么调鼠标速度? Manjaro鼠标设置光标速度的技巧