`
JavaCrazyer
  • 浏览: 2991601 次
  • 性别: Icon_minigender_1
  • 来自: 河南
社区版块
存档分类

快速掌握FCKEditor和CKEditor

阅读更多

其一:FCKEditor
首先上官方网站:www.fckeditor.net
下载FCKeditor_2.6.3.zip,将其中的fckeditor文件夹复制到WebRoot下面,后面可以直接使用
下一步(这一步不是必须的):
找到fckconfig.js文件进行编辑,可参考FCKConfig.ToolbarSets["Default"] =[ ]
[ ]里面的选项可根据自己喜好进行选择,然后取名FCKConfig.ToolbarSets["你取的工具条名称"]
接下来如果想在页面通过标签嵌入方式显示效果的话
必须添加java-core2.4.jar包来获取FCK的相应标签
       <%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
        <FCK:editor instanceName="content"  value=" " width="85%" height="300px" toolbarSet="你刚才取的名字">
        <FCK:config SkinPath="skins/silver/" AutoDetectLanguage="true" />
        </FCK:editor>
当然这里面的toolbarSet可以不写就用默认的工具条布局模式
1. 标签方式话代码如下
  <%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
  省略中间标签
  <FCK:editor  instanceName="content"  value=" " width="85%" height="300px">
        <FCK:config SkinPath="skins/silver/" AutoDetectLanguage="true" />
   </FCK:editor>
2.JavaScript方式的话不需导入标签库
  <script type="text/javascript">
   window.onload(function(){
   var oFCKeditor=new FCKeditor('MyTextarea');
   oFCKeditor.BasePath="fckeditor/";
    oFCKeditor.ReplaceTextarea();
   });
  </script>
<textarea rows="4" cols="60" name="MyTextarea"></textarea>
其二:CKEditor则更加方便快捷
   首先从官方网站上:www.fckeditor.net
   下载ckeditor_3.2.zip,将其加压,把ckeditor文件夹复制到WebRoot下面
第一种方式:通过设定textarea的类名为ckeditor即可替换:
                                        ...省略导入文件语句
     <textarea class="ckeditor" rows="10"   cols="80" name="editor1"> </textarea>
第二种方式:通过代码替换
     <script type="text/javascript" src="ckeditor/ckeditor.js"></script>
     <script type="text/javascript" src="ckeditor/_samples/sample.js"></script>
      <link rel="stylesheet" type="text/css" href="ckeditor/_samples/sample.css">
               <textarea rows="10" cols="80" name="editor1"> </textarea>
               <script type="text/javascript">
//<![CDATA[

CKEDITOR.replace( 'editor1',
{
fullPage : true
});

//]]>
                </script>
                  其中:,{fullPage:true}可以省略
其三:CKEditor的皮肤更换
     (1)定制皮肤:卡马,office2003,第二版皮肤
      CKEDITOR.replace( 'editor_kama',
{
skin : 'kama'
});
      其中eidor_kama为textera的名称,可以改变。
      skin可选的值有v2,office2003,kama
   (2)用户界面颜色选择器
   CKEDITOR.replace( 'editor1',
{

extraPlugins : 'uicolor',
uiColor: 'yellow',
toolbar :
[
[ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ],
[ 'UIColor' ]
]
});
       其中uiColor的值为初始页面的颜色可以为各种颜色green,yellow,red,blue等等
      ['UIColor']为真正出现的在工具条中的颜色选择器

其他功能如添加语言分类,淘宝网的选择在飞模式。比较麻烦参考下载包中samples中的index.jsp即可
2
0
分享到:
评论

相关推荐

    fckeditor和ckeditor3.5.3在J2ee下的使用

    NULL 博文链接:https://snv.iteye.com/blog/2034216

    fckeditor最新版ckeditor_3.0.zip 资源包免费下载

    fckeditor文本编辑器旧版漏洞太多 先出了最新版 欢迎下载使用

    ckeditor_4.5.11(即fckeditor)

    ckeditor_4.5.11,一款网页上的富文本编辑器(前身叫fckeditor),让你只需少量代码即可完成漂亮的页面文本编辑器,常用于邮箱等需要输入文本的地方。

    CKEditor/FCKEditor 使用 CKeditor 3.0.1 快速使用教程(含插入图片)

    一般来说,我们在编辑内容时,先是读入到 textarea,再将 textarea 的内容赋给编辑器。

    FCKEditor插件(自动排版)移植至CKEditor

    FCKEditor插件(自动排版)移植至CKEditor

    fckeditor中文使用手册(CHM版)

    虽然现在ckeditor官网的编辑器已经由FCKeditor改名为CKeditor,不过FCKeditor的开发文档依然保留 着,FCKeditor和CKeditor的大部分原理都差不多,所以本手册的大部分链接还是可以打开的。本人将 FCKeditor_2.6.5....

    CKEditor一般指FCKEDITOR

    它非常流行,互联网上很容易找到相关技术文档,国内许多WEB项目和大型网站均采用了FCKeditor。 FCKeditor是一个专门使用在网页上属于开放源代码的所见即所得文字编辑器。它志于轻量化,不需要太复杂的安装步骤即可...

    最新的ckeditor 富文本-FCKEditor控件

    最新的ckeditor 富文本-FCKEditor控件,最新的ckeditor 富文本-FCKEditor控件,属于第三方控件,功能齐全,完善,大部分的ASP.NET开发的网站都需要富文本控件,欢迎大家交流心得~

    最稳定fckeditor网页编辑器

    最新,最优化网页编辑器,fckeditor,ckeditor

    ckeditor 编辑器

    FCKeditor 相容于绝大部分的网页浏览器,像是 : Internet Explorer 5.5+ (Windows)、Mozilla Firefox 1.0+、Mozilla 1.3+ 和 Netscape 7+。在未来的版本也将会加入对 Opera 的支援。  FckEditor更名CKEditor  著名...

    FCKeditor2.4.2

    FCKeditor文本编辑程序(共享软件)为用户提供在线的文档编辑服务,其具有与微软office软件一样的功能,与之不同的是FCKeditor不需要用户安装任何形式的客户端,FCKeditor程序非常精简但功能强大,因此而受到广大...

    FCKeditor编辑器(适用于。net)

    FCKeditor 相容于绝大部分的网页浏览器,像是 : Internet Explorer 5.5+ (Windows)、Mozilla Firefox 1.0+、Mozilla 1.3+ 和 Netscape 7+。在未来的版本也将会加入对 Opera 的支持。 FckEditor更名CKEditor 著名的...

    ckeditor编辑器

    用过fckeditor的站长都知道,由于其打开速度的不理想把fckeditor用于网站做为在线编辑器并不是明智的选择,ckeditor正好弥补了这一缺陷,ckeditor是由Frederico Knabben,针对网络而开发的在线编辑器。它提供了令人...

    FCKeditor最新版及使用说明

    这是最新的FCKeditor 名为CKeditor 3.0.1 是官方的文件,但在官方的下载包中没有使用和配置说明,这里面加上了配置说明,是我自己整合的希望对大家有用。

    CKEditor FCKEditor 使用-集成 CKFinder(上传文件、浏览文件)

    CKEditor FCKEditor 使用-集成 CKFinder(上传文件、浏览文件)

    FCKeditor.Net_2.6.3.zip和FCKeditor-v2.6.3

    FCKeditor.Net_2.6.3.zip和FCKeditor-v2.6.3

    FCKeditor中文使用手册

    FCKeditor中文使用手册,本手册由建站三人行站长(www.zengl.com)提供的翻译。帮助程序员能够快速掌握fckeditor在线编辑器的使用。

    FCKEditor——开源的网页编辑器

     FCKeditor 相容于绝大部分的网页浏览器,像是 : Internet Explorer 5.5+ (Windows)、Mozilla Firefox 1.0+、Mozilla 1.3+ 和 Netscape 7+。在未来的版本也将会加入对 Opera 的支援。  FckEditor更名CKEditor  ...

    Fckeditor皮肤Fckeditor皮肤

    Fckeditor皮肤Fckeditor皮肤Fckeditor皮肤Fckeditor皮肤Fckeditor皮肤Fckeditor皮肤

    fckeditor和使用方法

    fckeditor和使用方法,可以上传图片,flash

Global site tag (gtag.js) - Google Analytics