FCKeditor——强大的HTML文本编辑插件(详细安装篇)

2006-09-21  duduwolf
一个偶然的机会发现了FCKeditor,非常非常的不错!


FCKeditor是sourceforge.net上面的一个开源项目。
一个强大的HTML文本编辑插件,主要实现了在线网页编辑的功能!
操作起来就跟MS WORD一样简单!
据我所知,FCKeditor是目前互联网上最好的编辑器,功能强大,支持多种浏览器,无平台限制,可以和多种WEB语言融合,多语言支持,开源等~~


下面是官方的介绍
This HTML text editor brings to the web many of the powerful functionalities of desktop editors like MS Word. It‘s lightweight and doesn‘t require any kind of installation on the client computer.
Because it is Open Source, you may use it however you want.

FCKeditor is now a “must have” editor. This version is even more stable, with many important bug fixings and new features, including native support for Python. Important additions have been also made to the JavaScript API.
With no doubts, FCKeditor is the most used web browser based text editor in the market, with almost 50,000 downloads monthly. This version comes to certify the quality and affordability of this project. Enjoy FCKeditor and have a Happy New Year!

FCKeditor is compatible with most internet browsers which include: IE 5.5+ (Windows), Firefox 1.0+, Mozilla 1.3+ and Netscape 7+.  On the server side, FCKeditor offers a complete integration pack for: ASP.Net、ASP、PHP、ColdFusion、Java、Perl
The editor runs over Windows, Mac and Linux operating systems.

下载或者查看详情请访问:http://www.fckeditor.net;

目前官方推荐的稳定版本是FCKeditor 2.3.1,最近我在官方又看到已经有了FCKeditor.Java 2.3版本了;
对用JAVA开发的朋友来说无疑是再开心不过了!

了解了该编辑器,下面再来看看具体应该怎么用吧!
我是学java的,在自己的工程里面试用了用一下FCKeditor,感觉确实不错,这里我简单介绍一下
(仅针对windows操作系统用Eclipse开发的java web工程)

一、下载FCKeditor;

    需要下载两个包:
    1、FCKeditor_2.3.1.zip   地址:http://www.fckeditor.net/download/default.html
         2、FCKeditor-2.3.zip   地址:http://sourceforge.net/project/showfiles.php?group_id=75348&package_id=129511

二、在Eclipse里面新建一个工程,然后把上面两个包的部分文件(对你有用的)考进工程相应目录,

    1、解压缩FCKeditor-2.3.zip,在FCKeditor-2.3\web\WEB-INF\lib里面你会看到commons-fileupload.jar和FCKeditor-2.3.jar这两个jar包,考入你工程里面的\workspace\yjhmily\WebRoot\WEB-INF\lib(yjhmily是我的工程名)中,其中commons-fileupload.jar已经存在,覆盖就行了!
    2、解压缩FCKeditor_2.2.zip,在\FCKeditor_2.2\FCKeditor中你会看到一个editor文件夹,这里面放的是一些必须的HTML、JS、skin、images、css……等文件,将整个文件夹考入你工程里面的\workspace\yjhmily\WebRoot\FCKeditor\editor中,其中FCKeditor是我自己建的目录,便与标识。当然,你也可以直接把editor文件夹考到WebRoot目录下。
    3、将\FCKeditor_2.2\FCKeditor中的fckconfig.js、fckeditor.afp、fckeditor.cfc、fckeditor.cfm、fckeditor.js、fckeditor.lasso、fckstyles.xml、fcktemplates.xml全部考入\workspace\yjhmily\WebRoot\FCKeditor下。其实只要保证这些文件跟editor在同一目录下就可以了!

三、我的工程结构图:

fck.jpg

四、一切OK,可以写一个JSP页面自己感受一下了。

    你只需要在JSP页面中写入以下这段代码就可以调用FCKeditor编辑器了!跟使用Struts的标签一样方便。(FCKeditor-2.3.zip中有很详细的例子)
   
    <FCK:editor id="EditorDefault" basePath="/FCKeditor/"
        imageBrowserURL="/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"
        linkBrowserURL="/FCKeditor/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"
        flashBrowserURL="/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"
        imageUploadURL="/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Image"
        linkUploadURL="/FCKeditor/editor/filemanager/upload/simpleuploader?Type=File"
        flashUploadURL="/FCKeditor/editor/filemanager/upload/simpleuploader?Type=Flash">
This is some <strong>sample text</strong>. You are using <a href="http://www.fredck.com/fckeditor/">FCKeditor</a>.
    </FCK:editor>   

五、FCK效果图

pic.jpg


以上只是我个人对FCKeditor的理解,希望各位网友指点。

    来自: duduwolf > 《编程》

    以文找文   |   举报

    猜你喜欢
    发表评论评论公约
    喜欢该文的人也喜欢 更多