最新下载
热门教程
- 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
相关文章
- 抖音网页版官方入口地址_抖音网页版访问入口全指南 12-12
- 奥特曼传奇英雄银河维克特利强度如何 12-12
- 工作实验室游戏官网入口erolabs-EROLABS工作实验室2026最新官网链接 12-12
- 囧次元动漫app官方正版下载入口-2025最新版资源免费下载 12-12
- 星球重启vip礼包获取途径 vip礼包怎么获得 12-12
- 漫蛙漫画官方正版网页入口网址 12-12