<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://m.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手机看片高清| 亚洲精品无AMM毛片| 四虎国产精品免费永久在线| 免费在线观看一级毛片| 国产亚洲精品精品精品| 无码国产亚洲日韩国精品视频一区二区三区| 亚洲kkk4444在线观看| 免费看的黄色大片| 精品国产日韩亚洲一区91| 免费在线观看一级毛片| 99精品全国免费观看视频..| 亚洲老妈激情一区二区三区| 四虎成人精品永久免费AV | 久久亚洲AV无码西西人体| 一级毛片试看60分钟免费播放| 亚洲精品无码专区久久同性男| 国产日韩在线视频免费播放| 久久精品国产精品亚洲蜜月| 四虎精品视频在线永久免费观看| 亚洲国产精品久久丫| 热99re久久免费视精品频软件| 人体大胆做受免费视频| 亚洲AV午夜成人影院老师机影院| 国产成人精品免费视频大全麻豆| 亚洲人成77777在线播放网站不卡| 国产色爽免费视频| 99精品免费视品| 中文字幕亚洲综合小综合在线| 日本一道一区二区免费看 | 一级a性色生活片久久无少妇一级婬片免费放 | 四虎在线最新永久免费| 精品国产亚洲第一区二区三区| 亚洲欧洲∨国产一区二区三区| 国产免费一区二区三区| 免费福利资源站在线视频| 亚洲AV无码一区二区三区系列| 久久久久国色AV免费看图片| aa午夜免费剧场| 亚洲人成电影在线观看网| 亚洲精品成人片在线观看| 久草视频在线免费|