集成FCKeditor到roller中

Roller提供了一個多媒體的編輯器,不過感覺不如我稀飯的FCKeditor好用。

看了一下Roller的擴展功能還是挺強的。把Roller集成到了FCK中

步驟:

  1. 編寫一個editor-fckeditor.jsp的網頁在 \roller-ui\authoring\editors 同時把FCK的目錄拷貝過去
  2. edit-fckeditor.jsp是把 edit-text.jsp拷貝過來的修改如下


添加:

<script type="text/javascript"  language="JavaScript" src="<%=request.getContextPath()%>/roller-ui/authoring/editors/FCKeditor/fckeditor.js"></script>


<script type="text/javascript">
<!--
  window.onload = function()
      {
        var oFCKeditor = new FCKeditor( 'text' ) ;
        oFCKeditor.BasePath = "<%=request.getContextPath()%>/roller-ui/authoring/editors/FCKeditor/" ;
        oFCKeditor.ToolbarSet="Admin";
        oFCKeditor.Height="330px";
        oFCKeditor.ReplaceTextarea() ;
      }

</script>

OK

享受FCKeditor把.

 


 

發佈了0 篇原創文章 · 獲贊 0 · 訪問量 2291
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章