javascript fckeditor编辑器取值与赋值实现代码
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);
}
function SetEditorContents(EditorName, ContentStr)
{
var oEditor = FCKeditorAPI.GetInstance(EditorName) ;
oEditor.SetHTML(ContentStr) ;
}
FCKeditor 插件开发
相关推荐
-
extjs fckeditor集成代码
复制代码 代码如下: { xtype : "textarea", name : "content", anchor : '97%', height : 400, id : "content", fieldLabel : "内容", listeners : { "render" : function(f) { fckEditor = new FCKeditor("content"); fc
-
js判断FCKeditor内容是否为空的两种形式
形式1: 复制代码 代码如下: function checkFCK(key) { var oEditor=FCKeditorAPI.GetInstance(key); var content=oEditor.GetXHTML(true); content=content.replace(/ /g,""); content=content.replace(/\s/g,""); content=content.replace(/ /g,""); co
-
FCKEditor常用Js代码,获取FCK内容,统计FCK字数,向FCK写入指定代码
content相当于你例子中的FCKeditor1. 复制代码 代码如下: //获取格式化的编辑器内容 function getEditorContents(){ var oEditor = FCKeditorAPI.GetInstance("content"); alert(oEditor.GetXHTML(true)); } //向编辑器插入指定代码 function insertHTMLToEditor(codeStr){ var oEditor = FCKeditorAPI.G
-
FCKeditor提供了一个完整的JavaScript API
FCKeditor offers a complete JavaScript API so you can interact with it once the editor is loaded and running. FCKeditor提供了一个完整的JavaScript API(Application Public Interface),你可以利用这些API来处理FCK编辑器,只要它被加载完成或在正在运行中. Retrieving an editor instanceOnce loaded,
-
Js FCKeditor的值获取和修改的代码小结
利用Javascript取和设FCKeditor值也是非常容易的,如下: // 获取编辑器中HTML内容 function getEditorHTMLContents(EditorName) { var oEditor = FCKeditorAPI.GetInstance(EditorName); return(oEditor.GetXHTML(true)); } // 获取编辑器中文字内容 function getEditorTextContents(EditorName) { var oEd
-
javascript 获取FCKeditor内容
形式如: 复制代码 代码如下: varoEditor=FCKeditorAPI.GetInstance('content'); varcontent=oEditor.GetXHTML(true); ************************************************* 利用Javascript取和设FCKeditor值也是非常容易的,如下: 复制代码 代码如下: // 获取编辑器中HTML内容 function getEditorHTMLContents(Editor
-
JS集成fckeditor及判断内容是否为空的方法
本文实例讲述了JS集成fckeditor及判断内容是否为空的方法.分享给大家供大家参考,具体如下: <script type="text/javascript"> <!-- // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application shoul
-
jsp fckeditor 上传中文图片乱码问题的解决方法
经过我修改ConnectorServlet.java和SimpleUploaderServlet.java两个文件,重新生成fckeditor-java-2.3.jar包,要解决所有的乱码问题,有3部要修改1.修改Web容器的字符编码,如果Web容器用的是Tomcat,则修改conf/server.xml文件,在两个Connector中添加"URIEncoding="utf-8"",我这里用的是utf-8编码,所以修改成utf-8,若项目是gb2312编码,则设置为
-
FCKeditorAPI 手册 js操作获取等
复制代码 代码如下: function abc() { var checkContent =FCKeditorAPI.GetInstance("editor");//获取实例 alert(checkContent.GetXHTML());//获取当前内容 var newelement = document.createElement("a"); newelement.href="#"; newelement.innerHTML="df&
-
JSP 页面中使用FCKeditor控件(js用法)
它可和PHP.JavaScript.ASP.ASP.NET.ColdFusion.Java.以及ABAP等不同的编程语言相结合."FCKeditor"名称中的"FCK" 是这个编辑器的作者的名字Frederico Caldeira Knabben的缩写. FCKeditor控件请到官方网站下载http://www.fckeditor.net,本例主要用到FCKeditor_2.6.3.zip.fckeditor-java-demo-2.4.1.zip.fckedit
-
fckeditor常用Js,获取fckeditor内容,统计fckeditor字数,向fckeditor写入指定代码
content相当于你例子中的FCKeditor1. 复制代码 代码如下: //获取格式化的编辑器内容 function getEditorContents(){ var oEditor = FCKeditorAPI.GetInstance("content"); alert(oEditor.GetXHTML(true)); } //向编辑器插入指定代码 function insertHTMLToEditor(codeStr){ var oEditor = FCKeditorAPI.G
随机推荐
- ThinkPHP中的常用查询语言汇总
- Linux运维常用命令
- javascript实现随机读取数组的方法
- 原生js实现移动端瀑布流式代码示例
- tomcat相关配置与eclipse集成_动力节点Java学院整理
- Java集合类的组织结构和继承、实现关系详解
- ASP.NET中MultiView和View选项卡控件的使用方法
- 脚本中出现 window.open() access is denied - 拒绝访问 情况一则及分析
- Mysql占用过高CPU时的优化手段(必看)
- php求正负数数组中连续元素最大值示例
- 超级ASP大分页_我的类容我做主
- ionic实现可滑动的tab选项卡切换效果
- 通用于ie和firefox的函数 GetCurrentStyle (obj, prop)
- jQuery.cookie.js实现记录最近浏览过的商品功能示例
- jQuery实现移动端Tab选项卡效果
- 新站流量一周打造2000IP全攻略
- Apache虚拟主机的配置和泛域名解析实现代码
- Java获得指定区间数的方法
- Java字符串去除特殊字符内容的实例
- 浅谈Python NLP入门教程