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 插件开发
相关推荐
-
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
-
extjs fckeditor集成代码
复制代码 代码如下: { xtype : "textarea", name : "content", anchor : '97%', height : 400, id : "content", fieldLabel : "内容", listeners : { "render" : function(f) { fckEditor = new FCKeditor("content"); fc
-
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 上传中文图片乱码问题的解决方法
经过我修改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编码,则设置为
-
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
-
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
-
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
-
javascript 获取FCKeditor内容
形式如: 复制代码 代码如下: varoEditor=FCKeditorAPI.GetInstance('content'); varcontent=oEditor.GetXHTML(true); ************************************************* 利用Javascript取和设FCKeditor值也是非常容易的,如下: 复制代码 代码如下: // 获取编辑器中HTML内容 function getEditorHTMLContents(Editor
随机推荐
- DDoS攻击的趋势与相关防御策略
- ASP 三层架构 Error处理类
- Javascript学习笔记之 对象篇(四) : for in 循环
- VBS监视网络连接与断开的代码
- 几个高效,简洁的字符处理函数
- JS实现密码框根据焦点的获取与失去控制文字的消失与显示效果
- dedecms5.5 最新版ckeditor编辑器整合教程
- Android开发笔记之:一分钟学会使用Logcat调试程序的详解
- Android 利用ViewPager实现图片可以左右循环滑动效果附代码下载
- Oracle Faq(Oracle的字符集问题)
- 网站404页面3秒后跳到首页的实例代码
- python模拟登陆阿里妈妈生成商品推广链接
- C++类中的static和const用法实例教程
- XHTML下用dl,dt,dd标签实现翻页的效果代码
- 比较深刻的在自习室墙上的20条名言
- PHP基础陷阱题(变量赋值)
- mssql查找备注(text,ntext)类型字段为空的方法
- MySQL的增删查改语句用法示例总结
- jquery队列queue与原生模仿其实现方法分享
- javascript函数作用域学习示例(js作用域)