最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
设置fck焦点及获取fck编辑器内容 长度 js代码
时间:2022-06-25 14:52:25 编辑:袖梨 来源:一聚教程网
本教程主要讲了怎么利用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
相关文章
- 以闪亮之名曳梦捏脸数据id攻略 04-25
- 火影忍者手游忍具修行卡购买有什么 04-25
- 深空之眼铃兰之弦雅典娜技能怎么样 04-25
- 心动小镇咖啡伞如何获取 04-25
- 奇迹暖暖辉心圣歌有哪些玩法 04-25
- 崩坏3星火重燃灼烁打法配置指南 04-25