<script>function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}</script>
1. 下载
官网:www.fckeditor.net
Zip包:FCKeditor_2.6.4.zip,fckeditor-java-2.4.1-bin.zip,fckeditor-java-2.4.1-src.zip
2. 安装使用
l 将FCKeditor_2.6.4.zip的解压文件放入project的webroot/
l Index.jsp的<head></head>中写入<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
l js引用方法(三种)
M1. form表单中直接引用
<script type="text/javascript">
var oFCKeditor = new FCKeditor('FCKeditor1');
oFCKeditor.BasePath = "/fckeditor/"; //注意修改路径
oFCKeditor.Create();
</script>
M2. 替换表单中的textarea元素
Head中写function()
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'MyTextarea' );
oFCKeditor.BasePath = "/fckeditor/";
oFCKeditor.ReplaceTextarea();
}
</script>
Body中加入textarea
<textarea id="MyTextarea" name="MyTextarea">This is the initial value.</textarea>
M3. ajax动态生成
var div = document.getElementById("myFCKeditor");
var fck = new FCKeditor("myFCKeditor");
div.innerHTML = fck.CreateHtml();
3. 取值
M1. String FCKcontent = request.getParameter(“FCKeditor1”);
4. Sample code
Style1.
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
</head>
<body>
<form>
<script type="text/javascript">
var oFCKeditor = new FCKeditor('FCKeditor1');
oFCKeditor.BasePath = "/fckeditor/";
oFCKeditor.Create();
</script>
</form>
</body>
</html>
Style2.
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'MyTextarea' ) ;
oFCKeditor.BasePath = "/fckeditor/" ;
oFCKeditor.ReplaceTextarea() ;
}
</script>
</head>
<body>
<textarea id="MyTextarea" name="MyTextarea">This is <b>the</b> initial value.</textarea>
</body>
</html>
分享到:
相关推荐
FCKEDITOR学习笔记资料.pdf
FCKeditor 学习笔记
FCKeditor应用完整例子,包括文字格式,文件上传等一一具全 J2EE JSP JAVA
fckeditor学习笔记 FCKEditor的调用: 方法一:通过javascript调用(前提是在head里要引入<script type="text/javascript" src="fckeditor/fckeditor.js">文件) 1.创建并输出一个编辑器(参见fckeditortest项目test1...
一个FCKeditor2.6.3 .NET2.0 C# 最简单实用的例子,该修改的已经全部修改 该删除的也已全部删除 完美解决上传的各种问题 在上传的文件夹里自动建立[年-月]文件夹
这是我自己整理的传智播客里的FCKeditor控件的使用,以及笔记。。。。。。。。。。。要是大家喜欢,可以拿去
FCKeditor在线编辑器的使用笔记,jsp 中使用
FCKEditor 学习笔记 这可是我精心写的哦,相信对你有帮助 里面详细写了一些在 J2EE 开发中所遇到的问题以及解决方法
FCKeditor 实例应用类似于 freetextbox,但个人感觉比freetextbox好用些
fckeditor 完整示例 samples
最详细的FCKEditor应用图解(经典)
Fckeditor皮肤Fckeditor皮肤Fckeditor皮肤Fckeditor皮肤Fckeditor皮肤Fckeditor皮肤
基于jsp的fckeditor应用实例,可以上传图片、flash等,并且可以正确的接收,中文问题可以通过设置字符编码解决。
在线编辑器 FCKeditor 的应用 在线编辑器 FCKeditor 的应用
FCKeditor 项目应用 FCKeditor 项目应用
显示fckeditor的应用。初学者使用。
FckEditor使用源码 包含需要的dll文件等
FCKEditor组件的应用,简单的文章编辑,上传文章,编辑文章,有数据库SQL 2000
软件介绍 1、什么是在线编辑器 2、fckeditor配置 ... $sBasePath = dirname($sBasePath).'/'; $oFCKeditor = new FCKeditor('FCKeditor1') ;... $oFCKeditor->BasePath = $sBasePath...4、fckeditor结合数据库应用
jsp页面上用的.调用方法和其他fckeditor一样