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 插件开发
相关推荐
-
FCKeditorAPI 手册 js操作获取等
复制代码 代码如下: function abc() { var checkContent =FCKeditorAPI.GetInstance("editor");//获取实例 alert(checkContent.GetXHTML());//获取当前内容 var newelement = document.createElement("a"); newelement.href="#"; newelement.innerHTML="df&
-
Js FCKeditor的值获取和修改的代码小结
利用Javascript取和设FCKeditor值也是非常容易的,如下: // 获取编辑器中HTML内容 function getEditorHTMLContents(EditorName) { var oEditor = FCKeditorAPI.GetInstance(EditorName); return(oEditor.GetXHTML(true)); } // 获取编辑器中文字内容 function getEditorTextContents(EditorName) { var oEd
-
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,
-
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
-
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
-
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
-
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
-
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编码,则设置为
-
javascript 获取FCKeditor内容
形式如: 复制代码 代码如下: varoEditor=FCKeditorAPI.GetInstance('content'); varcontent=oEditor.GetXHTML(true); ************************************************* 利用Javascript取和设FCKeditor值也是非常容易的,如下: 复制代码 代码如下: // 获取编辑器中HTML内容 function getEditorHTMLContents(Editor
随机推荐
- access中显示MSysObjects系统表的设置方法
- node实现定时发送邮件的示例代码
- 浅谈json取值(对象和数组)
- 使用vue编写一个点击数字计时小游戏
- Bootstrap Table使用整理(一)
- 突破winxp sp2/win2003 sp2超强弹窗代码
- java微信开发第二步 获取消息和回复消息
- 详解使用Spring Boot开发Web项目
- JS与jQuery实现子窗口获取父窗口元素值的方法
- ASP.Net中数据展示控件的嵌套使用示例
- c#在控制台输出彩色文字的方法
- unity3d发布apk在android虚拟机中运行的详细步骤(unity3d导出android apk)
- Python实现对字符串的加密解密方法示例
- 用php+javascript实现二级级联菜单的制作
- Android自定义Animation实现View摇摆效果
- Jquery $when done then的用法详解
- jquery把int类型转换成字符串类型的方法
- 将MySQL从MyISAM转换成InnoDB错误和解决办法
- 关于C# TabPage如何隐藏的问题
- javaScript call 函数的用法说明