最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
设置fck焦点及获取fck编辑器内容 长度 js代码
时间:2010-09-08 编辑:简简单单 来源:一聚教程网
本教程主要讲了怎么利用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
相关文章
- HTML简单购物数量小程序代码展示 10-31
- html canvas实现弹幕功能 10-31
- HTML中空格表示的意义 10-31
- html area标签解读 10-31
- html使用表单标签实现注册页面代码展示 10-31
- 使用HTML截图并保存为本地图片的代码展示 10-31