<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆 - 30, 文章 - 0, 評(píng)論 - 27, 引用 - 0
    數(shù)據(jù)加載中……

    FCKeditor使用說(shuō)明

     

    開(kāi)發(fā)環(huán)境:
    Tomcat6.0 MyEclipse 5.1.1

    FCKeditor 版本 FCKeditor_2.5 FCKeditor.Java 2.3

    下載地址: http://www.fckeditor.net/download/default.html

    開(kāi)始:

    新建工程,名稱(chēng)為 FCKeditor
    解壓 FCKeditor_2.5 包中的 edit 文件夾到項(xiàng)目中的 WebRoot\fck目錄

    解壓 FCKeditor_2.5 包中的 fckconfig.js、fckeditor.js、fckstyles.xml、fcktemplates.xml 文件夾到項(xiàng)目中的 WebRoot\fck目錄

    解壓 FCKeditor-2.3.zip 包中的 \web\WEB-INF\lib 下的兩個(gè) jar 文件到項(xiàng)目的 WebRoot\WEB-INF\lib 目錄

    解壓 FCKeditor-2.3.zip 包中的 \src 下的 FCKeditor.tld 文件到項(xiàng)目的 WebContent\WEB-INF 目錄

    刷新一下工程,有一個(gè)文件會(huì)出錯(cuò),不管它是什么錯(cuò),將錯(cuò)誤信息清除

    刪除 WebContent\edit 目錄下的 _source 文件夾

    修改 web.xml 文件,加入以下內(nèi)容


    代碼

     1<servlet> 
     2        <servlet-name>Connector</servlet-name> 
     3        <servlet-class>com.fredck.FCKeditor.connector.ConnectorServlet</servlet-class> 
     4        <init-param> 
     5            <param-name>baseDir</param-name> 
     6            <!-- 此為文件瀏覽路徑 --> 
     7            <param-value>/UserFiles/</param-value> 
     8        </init-param> 
     9        <init-param> 
    10            <param-name>debug</param-name> 
    11            <param-value>true</param-value> 
    12        </init-param> 
    13        <load-on-startup>1</load-on-startup> 
    14    </servlet> 
    15
    16    <servlet> 
    17        <servlet-name>SimpleUploader</servlet-name> 
    18        <servlet-class>com.fredck.FCKeditor.uploader.SimpleUploaderServlet</servlet-class> 
    19
    20       <init-param> 
    21            <param-name>baseDir</param-name> 
    22            <!-- 此為文件上傳路徑,需要在WebRoot 目錄下新建 UserFiles 文件夾 --> 
    23            <!-- 根據(jù)文件的類(lèi)型還需要新建相關(guān)的文件夾 Image、 Flash --> 
    24            <param-value>/UserFiles/</param-value> 
    25        </init-param> 
    26        <init-param> 
    27            <param-name>debug</param-name> 
    28            <param-value>true</param-value> 
    29        </init-param> 
    30        <init-param> 
    31            <!-- 此參數(shù)為是否開(kāi)啟上傳功能 --> 
    32            <param-name>enabled</param-name> 
    33            <param-value>false</param-value> 
    34        </init-param> 
    35        <init-param> 
    36            <param-name>AllowedExtensionsFile</param-name> 
    37            <param-value></param-value> 
    38        </init-param> 
    39        <init-param> 
    40            <!-- 此參數(shù)為文件過(guò)濾,以下的文件類(lèi)型都不可以上傳 --> 
    41            <param-name>DeniedExtensionsFile</param-name> 
    42            <param-value>php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi</param-value> 
    43        </init-param> 
    44        <init-param> 
    45            <param-name>AllowedExtensionsImage</param-name>
    46            <param-value>jpg|gif|jpeg|png|bmp</param-value> 
    47        </init-param> 
    48        <init-param> 
    49            <param-name>DeniedExtensionsImage</param-name> 
    50            <param-value></param-value> 
    51        </init-param> 
    52        <init-param> 
    53            <param-name>AllowedExtensionsFlash</param-name> 
    54            <param-value>swf|fla</param-value> 
    55        </init-param> 
    56        <init-param> 
    57            <param-name>DeniedExtensionsFlash</param-name> 
    58            <param-value></param-value> 
    59        </init-param> 
    60        <load-on-startup>1</load-on-startup> 
    61    </servlet> 
    62    
    63<servlet-mapping> 
    64    <servlet-name>Connector</servlet-name> 
    65    <url-pattern>/FCKeditor/fck/editor/filemanager/browser/default/connectors/jsp/connector</url-pattern> 
    66</servlet-mapping> 
    67
    68<servlet-mapping> 
    69    <servlet-name>SimpleUploader</servlet-name> 
    70    <url-pattern>/FCKeditor/fck/editor/filemanager/upload/simpleuploader</url-pattern> 
    71</servlet-mapping> 

    新建一個(gè)提交頁(yè) test.jsp 文件和一個(gè)接收頁(yè) show.jsp 文件

    test.jsp 代碼如下:


    代碼

     1<%@ page contentType = "text/html;charset=UTF-8" language = "java" %> 
     2<%@ taglib uri = "/WEB-INF/FCKeditor.tld" prefix = "fck" %><html> 
     3<head> 
     4    <title> Test </title> 
     5</head> <body> 
     6    <FORM action = "test1.jsp" > 
     7    <fck:editor id = "testfck" basePath = "/FCKeditor/fck/" 
     8    height = "100%" 
     9    skinPath = "/FCKeditor/fck/editor/skins/default/" 
    10    toolbarSet = "Default" 
    11    imageBrowserURL = "/FCKeditor/fck/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector" 
    12linkBrowserURL = "/FCKeditor/fck/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector" 
    13flashBrowserURL = "/FCKeditor/fck/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector" 
    14imageUploadURL = "/FCKeditor/fck/editor/filemanager/upload/simpleuploader?Type=Image" 
    15    linkUploadURL = "/FCKeditor/fck/editor/filemanager/upload/simpleuploader?Type=File" 
    16flashUploadURL = "/FCKeditor/fck/editor/filemanager/upload/simpleuploader?Type=Flash" > 
    17</fck:editor> 
    18<input type="submit" /> 
    19    </FORM> 
    20</body> 
    21</html>

    show.jsp 代碼如下:

     

     1<%@ page contentType = "text/html;charset=UTF-8" language = "java" %> 
     2<%@ taglib uri = "/WEB-INF/FCKeditor.tld" prefix = "fck" %><html> 
     3<head> 
     4    <title> Test </title> 
     5</head> <body> 
     6    <FORM action = "test1.jsp" > 
     7    <fck:editor id = "testfck" basePath = "/FCKeditor/fck/" 
     8    height = "100%" 
     9    skinPath = "/FCKeditor/fck/editor/skins/default/" 
    10    toolbarSet = "Default" 
    11    imageBrowserURL = "/FCKeditor/fck/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector" 
    12linkBrowserURL = "/FCKeditor/fck/editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector" 
    13flashBrowserURL = "/FCKeditor/fck/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector" 
    14imageUploadURL = "/FCKeditor/fck/editor/filemanager/upload/simpleuploader?Type=Image" 
    15    linkUploadURL = "/FCKeditor/fck/editor/filemanager/upload/simpleuploader?Type=File" 
    16flashUploadURL = "/FCKeditor/fck/editor/filemanager/upload/simpleuploader?Type=Flash" > 
    17</fck:editor> 
    18<input type="submit" /> 
    19    </FORM> 
    20</body> 
    21</html>


    在 WebRoot 目錄下新建 UserFiles 文件夾,在此文件夾下新建 Image 和 Flash 兩個(gè)文件夾

    這樣就可以測(cè)試了

     

    參考http://www.tkk7.com/oksonic/archive/2006/05/11/45687.aspx

    posted on 2008-01-05 21:12 石業(yè)海 閱讀(2079) 評(píng)論(6)  編輯  收藏 所屬分類(lèi): 常用組件

    評(píng)論

    # re: FCKeditor使用說(shuō)明  回復(fù)  更多評(píng)論   

    請(qǐng)問(wèn),我在使用FckEditor把原來(lái)編輯保存的內(nèi)容從數(shù)據(jù)庫(kù)里讀取出來(lái)時(shí),為什么顯示的不是 CSS作用后的編輯頁(yè)面,而是包括了HTML標(biāo)簽的內(nèi)容? 樓主 還碰到這個(gè)問(wèn)題? 怎么解決的?
    2008-01-28 16:56 | hejianhuacn

    # re: FCKeditor使用說(shuō)明  回復(fù)  更多評(píng)論   

    @hejianhuacn
    你把標(biāo)簽要轉(zhuǎn)義一下
    2008-04-19 07:27 | hi

    # re: FCKeditor使用說(shuō)明  回復(fù)  更多評(píng)論   

    如何初始化FCKeditor的值,也就是讀取數(shù)據(jù)庫(kù)里的值,如何放進(jìn)編輯區(qū)中
    2008-07-23 14:52 | cocopig

    # re: FCKeditor使用說(shuō)明  回復(fù)  更多評(píng)論   

    使用 html_entity_decode 函授對(duì)數(shù)據(jù)庫(kù)中的 html 轉(zhuǎn)義實(shí)體進(jìn)行解碼!!
    html_entity_decode($database_string)
    2008-10-17 00:33 | fortruth

    # re: FCKeditor使用說(shuō)明  回復(fù)  更多評(píng)論   

    jjjj
    2009-05-18 17:58 | 22

    # re: FCKeditor使用說(shuō)明  回復(fù)  更多評(píng)論   

    @22
    kkkk
    2009-05-18 17:59 | 22

    只有注冊(cè)用戶(hù)登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 亚洲精品亚洲人成在线| 亚洲精品国产手机| 亚洲第一精品在线视频| 久久精品国产亚洲av影院 | 日本特黄特黄刺激大片免费| 亚洲狠狠爱综合影院婷婷| 亚洲色偷偷偷鲁综合| 亚洲明星合成图综合区在线| 亚洲日本在线电影| 国产黄在线观看免费观看不卡| 久久狠狠躁免费观看2020| 永久免费av无码不卡在线观看| 国产gav成人免费播放视频| 国产亚洲精品美女久久久| 亚洲成综合人影院在院播放| 欧美激情综合亚洲一二区| 国产精品成人69XXX免费视频| 18以下岁毛片在免费播放| 黄网址在线永久免费观看| 国产亚洲AV手机在线观看| 亚洲电影在线播放| 青草青草视频2免费观看| 日本免费在线中文字幕| 精品无码国产污污污免费| 亚洲精品国产字幕久久不卡 | 亚洲制服丝袜精品久久| 污网站在线免费观看| 99爱在线观看免费完整版| 日本免费福利视频| 亚洲综合一区二区精品导航| 国产青草亚洲香蕉精品久久| 日本人成在线视频免费播放| 国产一区二区三区在线免费| 精品亚洲麻豆1区2区3区| 污污视频网站免费观看| 国产又大又粗又长免费视频| 亚洲人AV永久一区二区三区久久| 亚洲三级在线播放| 中文字幕久精品免费视频| 国产精品无码素人福利免费| 亚洲视频在线播放|