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 插件开发
相关推荐
-
Js FCKeditor的值获取和修改的代码小结
利用Javascript取和设FCKeditor值也是非常容易的,如下: // 获取编辑器中HTML内容 function getEditorHTMLContents(EditorName) { var oEditor = FCKeditorAPI.GetInstance(EditorName); return(oEditor.GetXHTML(true)); } // 获取编辑器中文字内容 function getEditorTextContents(EditorName) { var oEd
-
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
-
FCKeditorAPI 手册 js操作获取等
复制代码 代码如下: function abc() { var checkContent =FCKeditorAPI.GetInstance("editor");//获取实例 alert(checkContent.GetXHTML());//获取当前内容 var newelement = document.createElement("a"); newelement.href="#"; newelement.innerHTML="df&
-
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编码,则设置为
-
extjs fckeditor集成代码
复制代码 代码如下: { xtype : "textarea", name : "content", anchor : '97%', height : 400, id : "content", fieldLabel : "内容", listeners : { "render" : function(f) { fckEditor = new FCKeditor("content"); fc
-
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及判断内容是否为空的方法
本文实例讲述了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
-
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
-
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
-
javascript 获取FCKeditor内容
形式如: 复制代码 代码如下: varoEditor=FCKeditorAPI.GetInstance('content'); varcontent=oEditor.GetXHTML(true); ************************************************* 利用Javascript取和设FCKeditor值也是非常容易的,如下: 复制代码 代码如下: // 获取编辑器中HTML内容 function getEditorHTMLContents(Editor
随机推荐
- Go语言通过Luhn算法验证信用卡卡号是否有效的方法
- SQL语句详细说明[部分]
- 浅谈jQuery hover(over, out)事件函数
- Angular.Js的自动化测试详解
- js模拟3D场景效果代码打包
- PHP+jquery实时显示网站在线人数的方法
- 基于c中使用ftruncate()前需要fflush(),使用后需要rewind()的深入探讨
- mysql外键(Foreign Key)介绍和创建外键的方法
- js模拟电脑选择多文件夹效果_选区代码
- BUTTON和INPUT的区别
- 详解Nginx配置SSL证书实现Https访问
- 使用C语言打造通讯录管理系统和教学安排系统的代码示例
- 基于C++输出指针自增(++)运算的示例分析
- PHP Laravel实现文件下载功能
- C# this关键字的四种用法
- PHP中上传大体积文件时需要的设置
- Android自定义键盘的实现(数字键盘和字母键盘)
- Android ROM升级包的选项解释
- Node.js上传文件功能之服务端如何获取文件上传进度
- java对同一个文件进行读写操作方法