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

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

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

    Java快速開發平臺

    www.fastunit.com

      BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
      23 Posts :: 0 Stories :: 273 Comments :: 0 Trackbacks

     

    本文介紹FCKeditor在Java環境下的使用方法。

    一、簡介

    功能:所見即所得,支持圖片和Flash,工具欄可自由配置,使用簡單
    兼容性:IE 5.5+、Firefox 1.5+、Safari 3.0+、Opera 9.50+、Netscape 7.1+、 Camino 1.0+
    成熟度:使用廣泛,被Baidu、CSDN等選用

    二、下載

    官方下載首頁:http://www.fckeditor.net/download/,當前版本為2.5.1
    需要下載FCKeditor 2.5.1(FCKeditor_2.5.1.zip)和FCKeditor.Java(FCKeditor-2.3.zip

    三、部署

    本例以WebRoot作為應用根路徑,部署后的目錄結構如下圖所示:


    1、FCKeditor_2.5.1.zip解壓,將fckeditor文件夾復制到/WebRoot/下

    2、FCKeditor-2.3.zip解壓,將commons-fileupload.jar和FCKeditor-2.3.jar復制到/WebRoot/WEB-INF/lib/下

    3、修改/WebRoot/WEB-INF/web.xml文件,增加以下內容:
        <servlet>
            
    <servlet-name>Connector</servlet-name>
            
    <servlet-class>com.fredck.FCKeditor.connector.ConnectorServlet</servlet-class>
            
    <init-param>
                
    <param-name>baseDir</param-name>
                
    <param-value>/UserFiles/</param-value>
            
    </init-param>
            
    <init-param>
                
    <param-name>debug</param-name>
                
    <param-value>true</param-value>
            
    </init-param>
            
    <load-on-startup>1</load-on-startup>
        
    </servlet>

        
    <servlet>
            
    <servlet-name>SimpleUploader</servlet-name>
            
    <servlet-class>com.fredck.FCKeditor.uploader.SimpleUploaderServlet</servlet-class>
            
    <init-param>
                
    <param-name>baseDir</param-name>
                
    <param-value>/UserFiles/</param-value>
            
    </init-param>
            
    <init-param>
                
    <param-name>debug</param-name>
                
    <param-value>true</param-value>
            
    </init-param>
            
    <init-param>
                
    <param-name>enabled</param-name>
                
    <param-value>true</param-value>
            
    </init-param>
            
    <init-param>
                
    <param-name>AllowedExtensionsFile</param-name>
                
    <param-value></param-value>
            
    </init-param>
            
    <init-param>
                
    <param-name>DeniedExtensionsFile</param-name>
                
    <param-value>php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi</param-value>
            
    </init-param>
            
    <init-param>
                
    <param-name>AllowedExtensionsImage</param-name>
                
    <param-value>jpg|gif|jpeg|png|bmp</param-value>
            
    </init-param>
            
    <init-param>
                
    <param-name>DeniedExtensionsImage</param-name>
                
    <param-value></param-value>
            
    </init-param>
            
    <init-param>
                
    <param-name>AllowedExtensionsFlash</param-name>
                
    <param-value>swf|fla</param-value>
            
    </init-param>
            
    <init-param>
                
    <param-name>DeniedExtensionsFlash</param-name>
                
    <param-value></param-value>
            
    </init-param>
            
    <load-on-startup>1</load-on-startup>
        
    </servlet>

      
    <servlet-mapping>
        
    <servlet-name>Connector</servlet-name>
        
    <url-pattern>/fckeditor/connector</url-pattern>
      
    </servlet-mapping>
      
      
    <servlet-mapping>
        
    <servlet-name>SimpleUploader</servlet-name>
        
    <url-pattern>/fckeditor/simpleuploader</url-pattern>
      
    </servlet-mapping>

    4、修改/WebRoot/fckeditor/fckconfig.js,修改部分如下:

    FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=/fckeditor/connector' ;
    FCKConfig.ImageBrowserURL 
    = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=/fckeditor/connector' ;
    FCKConfig.FlashBrowserURL 
    = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Flash&Connector=/fckeditor/connector' ;
    FCKConfig.LinkUploadURL 
    = '/fckeditor/simpleuploader?Type=File' ;
    FCKConfig.ImageUploadURL 
    = '/fckeditor/simpleuploader?Type=Image' ;
    FCKConfig.FlashUploadURL 
    = '/fckeditor/simpleuploader?Type=Flash';

    注意
    (1) 步驟3、4設置了文件瀏覽和上傳的配置,web.xml中Servlet的<url-pattern>要和fckconfig.js中的URL引用一致;
    (2) 本例正常運行的前提是WebRoot被部署為根路徑,如果設了虛擬路徑會找不到servlet。

    四、使用

    本例使用最直接的js方式,API和TagLib方式參見FCKeditor-2.3.zip解壓后_samples下的例子。
    fckdemo.jsp: 

    <%@    page contentType="text/html;charset=GBK"%>
    <html>
    <head>
    <title>FCKeditor Test</title>
    <script type="text/javascript" src="/fckeditor/fckeditor.js"></script>
    </head>
    <body>
    <form action="fckdemo.jsp" method="post">

    <% 
    String content=request.getParameter("content");
    if (content != null) {
      content 
    = content.replaceAll("\r\n""");
      content 
    = content.replaceAll("\r""");
      content 
    = content.replaceAll("\n""");
      content 
    = content.replaceAll("\"", "'");
    }else{
      content 
    = "";
    }
    %>

    <table width=100%>
    <tr>
        
    <td colspan=4 style='text-align:center' width=100% height=50px>
        
    <span>
            
    <script type="text/javascript">
                
    var oFCKeditor = new FCKeditor('content');//傳入參數為表單元素(由FCKeditor生成的input或textarea)的name
                oFCKeditor.BasePath='/fckeditor/';//指定FCKeditor根路徑,也就是fckeditor.js所在的路徑
                oFCKeditor.Height='100%';
                oFCKeditor.ToolbarSet
    ='Demo';//指定工具欄
                oFCKeditor.Value="<%=content%>";//默認值
                oFCKeditor.Create();
            
    </script>
        
    </span>
        
    </td>
    </tr>
    <tr><td align=center><input type="submit" value="提交"></td></tr>
    <tr><td>&nbsp;</td></tr>
    <tr><td>取值(可直接保存至數據庫):</td></tr>
    <tr><td style="padding:10px;"><%=content%></td></tr>
    </table>

    </form>
    </body>
    </html>

    效果圖:


    五、配置文件fckconfig.js

    1、DefaultLanguage:缺省語言,可更改為“zh-cn”

    2、自定義工具欄:可修改或增加ToolbarSets,例如:

    FCKConfig.ToolbarSets["Demo"= [
        ['Bold','Italic','
    -','OrderedList','UnorderedList','-','Link','Unlink','-','TextColor','BGColor','-','Style','-','Image','Flash','Table']
    ] ;

    3、EnterMode和ShiftEnterMode:“回車”和“Shift+回車”的換行行為,注釋提示了可選模式

    4、EditorAreaCss:編輯區樣式文件

    5、其他參數(轉):

    AutoDetectLanguage=true/false   自動檢測語言 
    BaseHref
    =""   相對鏈接的基地址 
    ContentLangDirection
    ="ltr/rtl"   默認文字方向 
    ContextMenu
    =字符串數組,右鍵菜單的內容 
    CustomConfigurationsPath
    =""   自定義配置文件路徑和名稱 
    Debug
    =true/false   是否開啟調試功能,這樣,當調用FCKDebug.Output()時,會在調試窗中輸出內容 
    EnableSourceXHTML
    =true/false   為TRUE時,當由可視化界面切換到代碼頁時,把HTML處理成XHTML 
    EnableXHTML
    =true/false   是否允許使用XHTML取代HTML 
    FillEmptyBlocks
    =true/false   使用這個功能,可以將空的塊級元素用空格來替代 
    FontColors
    =""   設置顯示顏色拾取器時文字顏色列表 
    FontFormats
    =""   設置顯示在文字格式列表中的命名 
    FontNames
    =""   字體列表中的字體名 
    FontSizes
    =""   字體大小中的字號列表 
    ForcePasteAsPlainText
    =true/false   強制粘貼為純文本 
    ForceSimpleAmpersand
    =true/false   是否不把&符號轉換為XML實體 
    FormatIndentator
    =""   當在源碼格式下縮進代碼使用的字符 
    FormatOutput
    =true/false   當輸出內容時是否自動格式化代碼 
    FormatSource
    =true/false   在切換到代碼視圖時是否自動格式化代碼 
    FullPage
    =true/false   是否允許編輯整個HTML文件,還是僅允許編輯BODY間的內容 
    GeckoUseSPAN
    =true/false   是否允許SPAN標記代替B,I,U標記 
    IeSpellDownloadUrl
    =""下載拼寫檢查器的網址 
    ImageBrowser
    =true/false   是否允許瀏覽服務器功能 
    ImageBrowserURL
    =""   瀏覽服務器時運行的URL 
    ImageBrowserWindowHeight
    =""   圖像瀏覽器窗口高度 
    ImageBrowserWindowWidth
    =""   圖像瀏覽器窗口寬度 
    LinkBrowser
    =true/false   是否允許在插入鏈接時瀏覽服務器 
    LinkBrowserURL
    =""   插入鏈接時瀏覽服務器的URL 
    LinkBrowserWindowHeight
    =""鏈接目標瀏覽器窗口高度 
    LinkBrowserWindowWidth
    =""鏈接目標瀏覽器窗口寬度 
    Plugins
    =object   注冊插件 
    PluginsPath
    =""   插件文件夾 
    ShowBorders
    =true/false   合并邊框 
    SkinPath
    =""   皮膚文件夾位置 
    SmileyColumns
    =12   圖符窗列數 
    SmileyImages
    =字符數組   圖符窗中圖片文件名數組 
    SmileyPath
    =""   圖符文件夾路徑 
    SmileyWindowHeight   圖符窗口高度 
    SmileyWindowWidth   圖符窗口寬度 
    SpellChecker
    ="ieSpell/Spellerpages"   設置拼寫檢查器 
    StartupFocus
    =true/false   開啟時FOCUS到編輯器 
    StylesXmlPath
    =""   設置定義CSS樣式列表的XML文件的位置 
    TabSpaces
    =4   TAB鍵產生的空格字符數 
    ToolBarCanCollapse
    =true/false   是否允許展開/折疊工具欄 
    ToolbarSets
    =object   允許使用TOOLBAR集合 
    ToolbarStartExpanded
    =true/false   開啟是TOOLBAR是否展開 
    UseBROnCarriageReturn
    =true/false   當回車時是產生BR標記還是P或者DIV標記

    六、自定義樣式

    工具欄的Style選項,是由fckconfig.js指定的配置文件來產生的:

    FCKConfig.StylesXmlPath  = FCKConfig.EditorPath + 'fckstyles.xml' ;

    可修改fckstyles.xml來自定義樣式。

    posted on 2008-02-18 20:15 FastUnit 閱讀(108497) 評論(79)  編輯  收藏 所屬分類: Java 、JavaScript

    Feedback

    # re: HTML編輯器FCKeditor使用詳解 2008-02-18 22:12 海邊沫沫
    http://www.tkk7.com/youxia/archive/2007/03/15/104077.html  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-02-18 22:44 FastUnit
    @海邊沫沫
    已拜讀,好文!  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-02-19 08:54 魔域私服
    已拜讀,好文!  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解[未登錄] 2008-03-13 13:53 is
    oFCKeditor.Value="<%=content==null?"":(content.replaceAll("\"", "'"))%>";//默認值

    我用你的方法后,在上面這行上報錯.頁面顯示不出來  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-03-15 12:11 FastUnit
    @is
    我重新測了一下fckdemo.jsp,沒有發現問題。
    你是否做了某些修改、報錯信息是什么?  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-05-04 14:24 劉俊杰
    我也沒有顯示出來的,方便的話可加我:QQ:178070373,ljh0242@163.com  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-05-06 14:22 FastUnit
    @劉俊杰
    已加。  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解[未登錄] 2008-05-27 14:24 linda
    我也沒有顯示出來的
    oFCKeditor.Value="<%=content==null?"":(content.replaceAll("\"", "'"))%>";//默認值

    報的是腳本錯誤:unterminated string literal
      回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-05-28 19:37 FastUnit
    @linda
    使用js賦值方式時,如果值包含回車就會報這個錯誤,我已在fckdemo.jsp中增加了回車的替換。
      回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-07-07 18:00 vb2005xu@sina.com
    $fcked->InstanceName = 'mythis' ; -- 這個才是你要設置的FORM控件的名字

    取值當然要從這里了 ... 你寫的東西 我估計 你自己 也沒整明白吧  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-07-07 18:01 vb2005xu@sina.com
    var oFCKeditor = new FCKeditor('content');//表單的name,取值的依據
    還 表單的名字 ,, 你 有點常識 好不??
    不會 就別誤導別人  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-07-08 18:08 FastUnit
    @vb2005xu@sina.com
    “表單的name”確實表達有誤,表單控件/表單元素可能會準確一點,實際上對應為FCKeditor生成的一個<input>或<textarea>的“name”屬性。
      回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-07-18 13:56 陳坤
    分頁符在IE下面默認為<div style="page-break-after: always"><span style="display: none">&nbsp;</span></div>,我想改為其他的,怎么修改?  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-07-20 20:12 FastUnit
    @陳坤
    打開/editor/js/fckeditorcode_ie.js,修改FCKPageBreakCommand.prototype.Execute()。  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-08-02 14:26 lilsean
    把fckeditor文件復制到webroot下
    然后配置也和你一樣
    結果頁面那個框顯示不出來
    new FCKeditor創建不出來這個對象嗎?
    路徑應該沒啥錯的
    都和你一樣的
    qq:409583691  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-08-03 22:00 Keind
    誰能教我~~用FCK  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-08-08 17:57 大狗
    new FCKeditor創建不出來這個對象  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-08-09 15:20 gracia
    請問樓主這個FCKeditor的非空驗證怎么寫
    我的QQ號是254012079
    如果哪位高手知道的話,麻煩教一下!  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-08-15 21:02 木風口子
    樓主能否寫個將編輯器內容獲得后放入數據庫的例子,我弄了好久,總是不行,謝謝!?。。∥业腝Q315213073  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解[未登錄] 2008-08-18 11:33 32
    佛擋殺佛  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解[未登錄] 2008-08-18 11:35
    怎么我在文本里面輸入200個字以上就保存不其呢,請大俠幫我解決一下,謝謝  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-08-19 14:43 莎士比亞
    把fckeditor文件復制到webroot下
    然后配置也和你一樣
    結果頁面那個框顯示不出來
    new FCKeditor創建不出來這個對象嗎?
    路徑應該沒啥錯的
    都和你一樣的
    我qq:823775485  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-08-28 10:47 zhangyq
    已拜讀,好文!已收藏.  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-09-12 10:58 劉亞東
    我取出的值怎么老是html代碼啊,
    <tr><td align=center><input type="submit" value="提交"></td></tr>
    <tr><td>&nbsp;</td></tr>
    <tr><td>取值(可直接保存至數據庫):</td></tr>
    <tr><td style="padding:10px;"><%=content%></td></tr>
    </table>
    保存到數據庫怎么老是html代碼,能不能去中文的值啊。  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2008-10-31 12:38 小亮Web
    我的也顯示不出來 方便的話加我Q 362556638



    不勝感激



    多指教.....  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解[未登錄] 2008-11-20 16:39 冷雪
    我把帶有html標記的文章加進去后,顯示出來的時候把html解析了,如加入" <B>加粗 </B> "后,則在頁面顯示的時候就會顯示成"加粗",此時會成為粗體,我想讓它顯示的時候還顯示" <B>加粗 </B> ",應該怎么做?非常感謝!我用的是2.6版本的FCKeditor  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-01-01 15:53 山寨貨網
    感謝……  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-01-03 11:10 luyx
    為什么我的回車沒有起到換行的作用呢

    怎么jj  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-01-09 02:07 Rachel
    @海邊沫沫
    拜讀,寫的確實很好  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-02-05 09:47 戰神
    拜讀 不錯
    看看行不行 值得研究
    QQ:369415359  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-02-05 17:33 阿斯頓發發發方法
    上的反反復復反反復復反反復復   回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-02-13 10:20 xyqclq
    ASP中調用HTML編輯器,提交后,顯示HTML代碼問題:原系統可能是用UBB編輯器的.只要在顯示頁面里的顯示文本框中找到類似這句<% =ubbcode(unhtml(rs("content"))) %> 的語句, 改成<% =ubbcode(rs("content"))%> 或<% =rs("content") %> .就可以正確顯示HTML編輯器編輯的內容了.
     不過要順便說明,改成<% =ubbcode(rs("content")) %> 后,原UBB編輯器編輯的內容也可以顯示,但沒有格式變了.改成<% =rs("content")%> 后,原UBB編輯器編輯的內容顯示的是原代碼.  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解[未登錄] 2009-02-22 18:35 吳浩
    我的也是,你知道的是什么原因了嗎?@大狗
      回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-03-04 20:48 學習
    樓主 為什么我點圖標保存后 頁面剛輸入的內容就都沒有了啊
    請問該怎么解決啊   回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-03-04 20:51 學習
    如果不能保存 去掉這個按鈕也行 我嘗試了好久都不行 樓主教教我吧 謝謝 我QQ是610331187
      回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-03-10 16:04 gfwe
    交流java開發技術,促進技術進步?。。?
    歡迎加入java技術交流群48419050  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-03-31 11:35
    樓主,按你的方法配置,顯示不出 頁面的編輯框(fckeditor.js)調不出來
      回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-04-16 18:57 layn
    樓主,請問一下知道怎么在fckeditor光標處插入文本嗎,就是用腳本在光標處插入文本  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-04-21 12:35 xli
    你好。怎么樣在字體欄中選擇“宋體”,并且能起作用。謝謝。方便時加qq354221265  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-04-25 19:36 apache
    強,受教了!  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-04-27 22:06 我就是不輸用戶名
    怎么看不懂??!   回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-05-07 23:41 可憐人
    哎~!對不起。我照著你這樣配置。但是tomcat啟動的時候報錯了。現在改成新版本啦  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-05-08 11:41 replica watches
    <a href="htp://www.2009watches.com/"><h1>replica watches</h1></a>
    welcome to <a href="http://www.2009watches.com/">replica watches online shop</a>  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-05-08 11:42 replica watches
    welcome to http://www.2009watches.com  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解[未登錄] 2009-05-08 16:19 zhang
    有 .net 版的沒?
    我想要.net版的  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-05-11 18:25 lonely
    有用 嗎? 有用我就試試了  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-05-20 08:29 fdsf
    fdssdf
    dsfaf
    asdfasdf
    asdfasd
    sdfasd
    sdfasdf
    sdfasdf
    sdfasdf
    sdfasdfsd  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-06-04 16:44 napolen
    將fckeditor復制后,里面editor文件夾下的dialog文件夾有個小叉,是怎么回事呢,這個dialog文件夾有什么用呢,用的環境是myeclipse,方便的話加一下qq 365690335  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解[未登錄] 2009-06-10 14:02 呵呵
    樓主的示例很好,我測試通過了。謝謝,其它沒跑通的是你沒部署正確,不要隨便指責,是你自已的問題。  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解[未登錄] 2009-06-10 14:04 呵呵
    @vb2005xu@sina.com
    你有點常識行不?/
    這是JS按'content' 自動創建一個  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-06-12 10:45 燕燕
    你好,我想問下http://www.fckeditor.net/download/,目前版本是2.6的,我下來后就一個zip文件,我是不是也要下載FCKeditor-2.3.zip版本的才能用啊 ,
    FCKeditor 2.5.1(FCKeditor_2.5.1.zip)和FCKeditor.Java(FCKeditor-2.3.zip)
      回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-06-23 09:01 123





    <a href=""></a>

      回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解[未登錄] 2009-07-27 22:53 民工
    fckdemo.jsp和fckeditor/fckeditor.js如果不是在同一個目錄應該這樣寫
    <script type="text/javascript" src="fckeditor/fckeditor.js"></script>
    沒有前面的"/"  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-08-28 14:19 聚資庫
    好文章,頂.........  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-09-30 19:34 聶亮
    這么差的代碼還拿出來啊
    不知道有錯誤嗎
    沒有引入樣式表
    并且那個基地址也錯了
    應該是這樣的
    oFCKeditor.BasePath='<%=basePath %>/fckeditor/';
    <link href="<%=basePath %>/fckeditor/_samples/sample.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="<%=basePath %>/fckeditor/fckeditor.js"></script>   回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-10-28 15:05 李龍
    創建不出編輯器,不知道哪里出錯。已經自己檢查幾天了。還未解決。請各位高手指點指點,QQ:838909973 感激不盡。  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2009-10-28 15:08 李龍
    老是報錯:未結束的字符串常量,同上。  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2010-01-05 10:57 juan
    的防守對方  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2010-09-04 12:14 hyc
    把fckeditor文件復制到webroot下
    然后配置也和你一樣
    結果頁面那個框顯示不出來
    new FCKeditor創建不出來這個對象嗎?
    路徑應該沒啥錯的
    都和你一樣的
    qq:429559515   回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2010-09-04 12:52 hyc
    oFCKeditor.ToolbarSet='Demo';//指定工具欄
    'Demo'指的是什么!  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2010-09-04 12:53 hyc
    @聶亮
    很好!  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2010-10-12 14:10 liwang
    出不來的原因是!  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2010-10-12 14:12 liwang
    出不來的原因是路徑問題,、
    oFCKeditor.BasePath='/fckeditor/';改成 oFCKeditor.BasePath='fckeditor/';
    把<script type="text/javascript" src="/fckeditor/fckeditor.js"></script>
    改成<script type="text/javascript" src="fckeditor/fckeditor.js"></script>  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2010-12-02 16:01 BB霜
    在asp.net mvc下面也可以使用嗎?  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2010-12-02 16:02 淘寶汽車坐墊
    看上去這個還不錯,用和ewebedit哪個更好呢  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2011-03-02 16:16 樹上の螞蟻
    能寫了按鈕直接調用編輯器的文本顏色選擇器嗎??  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2011-05-17 10:17 1223
    日你媽  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2011-05-30 16:12 sakilazhen
    我的怎么就不出來,fck_docprops.html頁面的
    代碼報錯說option沒有關閉,這是什么原因  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解[未登錄] 2011-09-01 10:24 kkk
    <%@ page contentType="text/html;charset=GBK"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    <html>
    <head>
    <title>FCKeditor Test</title>
    <link href="<%=basePath %>/fckeditor/_samples/sample.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%=basePath %>/fckeditor/fckeditor.js"></script>
    </head>
    <body>
    <form action="fckdemo.jsp" method="post">
    <%
    String content = request.getParameter("content");
    if (content != null) {
    content = content.replaceAll("\r\n", "");
    content = content.replaceAll("\r", "");
    content = content.replaceAll("\n", "");
    content = content.replaceAll("\"", "'");
    } else {
    content = "";
    }
    %>
    <table width=100%>
    <tr>
    <td colspan=4 style='text-align: center' width=100% height=300px>
    <span>
    <script type="text/javascript">
    var oFCKeditor = new FCKeditor('content');//傳入參數為表單元素(由FCKeditor生成的input或textarea)的name , 對應為FCKeditor生成的一個<input>或<textarea>的“name”屬性
    oFCKeditor.BasePath='<%=basePath %>/fckeditor/'; //指定FCKeditor根路徑,也就是fckeditor.js所在的路徑
    oFCKeditor.Height='100%';
    oFCKeditor.Value="<%=content==null?"":(content.replaceAll("\"", "'"))%>";//
    oFCKeditor.Create();
    </script> </span>
    </td>
    </tr>
    <tr>
    <td align=center>
    <input type="submit" value="提交">
    </td>
    </tr>
    <tr>
    <td>
    &nbsp;
    </td>
    </tr>
    <tr>
    <td>
    取值(可直接保存至數據庫):
    </td>
    </tr>
    <tr>
    <td style="padding: 10px;"><%=content%></td>
    </tr>
    </table>

    </form>
    </body>
    </html>  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2011-09-15 09:00 loan
    Following my analysis, billions of persons on our planet receive the personal loans from good banks. Thus, there's good possibilities to find a small business loan in all countries.   回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2011-10-07 03:24 written essays
    When you have got a chance to utilize the paper writing service, do not doubt, purchase custom essay and just chill out.   回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2012-05-09 13:12 domain registration india
    Outstanding blog post, I have marked your site so ideally I’ll see much more on this subject in the foreseeable future…
      回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2012-07-04 21:52 lxx
    我也是 按著你寫的做了 但是只出來提交和那一行字 哪位大蝦幫幫我啊 251779963+++  回復  更多評論
      

    # whjcwbua@gmail.com 2013-03-19 21:25 http://thebestshoelifts.weebly.com
    The concept of your blog is truly fresh, I am positive that the people who find your blogs will definitely benefit your content and pointers.  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2013-04-17 10:36 Stacy
    Thanks for sharing the great information about Social websites which is very important to increase our traffic and increase our visibility
    stacy@listfreewebdirectories.com  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解[未登錄] 2013-09-04 11:36 li
    彈出框 工具欄設置"Demo" 不存在   回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解[未登錄] 2013-11-18 09:30 Dream
    FCKeditor編輯器,代碼改成如下后
    FCKConfig.EnterMode = 'br' ; // p | div | br
    FCKConfig.ShiftEnterMode = 'p' ; // p | div | br
    在編輯器中,每回車一下,內容后面自動多出一個</br>  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解[未登錄] 2014-06-25 15:35 李強
    做得好棒.利用客觀唯一性才能正確評價事物,包括義務規定不能被逃避.  回復  更多評論
      

    # re: HTML編輯器FCKeditor使用詳解 2015-02-12 08:45 mkop
    kanyikan  回復  更多評論
      

    主站蜘蛛池模板: 亚洲成人免费网址| 亚洲婷婷国产精品电影人久久| 亚洲色欲色欱wwW在线| 日本19禁啪啪无遮挡免费动图| 人妻巨大乳hd免费看| 久久精品国产精品亚洲艾草网| 欧洲精品成人免费视频在线观看| 国产成人久久精品亚洲小说| 久久亚洲精品无码| 麻豆成人精品国产免费| a视频在线免费观看| 亚洲成A人片在线播放器| 夜夜春亚洲嫩草影院| 无码高潮少妇毛多水多水免费| 两个人日本WWW免费版| 亚洲喷奶水中文字幕电影| 亚洲伊人久久综合中文成人网| 无码精品A∨在线观看免费| 特级毛片全部免费播放| 亚洲明星合成图综合区在线| 亚洲一区二区视频在线观看| 成年在线观看网站免费| 久久免费香蕉视频| 亚洲成a∧人片在线观看无码| 亚洲av无码av制服另类专区| 国产女高清在线看免费观看| 18禁无遮挡无码国产免费网站| 一个人看的免费高清视频日本| 亚洲一区AV无码少妇电影| 国产亚洲综合一区柠檬导航| 国产大片51精品免费观看| 天天影视色香欲综合免费| 花蝴蝶免费视频在线观看高清版 | 亚洲AV无码一区二区三区鸳鸯影院| 亚洲AV日韩精品久久久久久久 | 免费少妇a级毛片| 国产在线国偷精品产拍免费| 日韩精品内射视频免费观看| 久久久久久噜噜精品免费直播| 免费在线观看亚洲| 亚洲综合av一区二区三区不卡 |