FCKeditor-初學篇

FCKeditor-初學篇

  最近想用類似 Htmlarea 功能的免費編輯器,結果試用的結果以tinymce & FCKeditor 較適合我!
  故..在此紀錄一些必要設定(PHP):
1.
留下editor資料夾,與fckstyles.xml、fcktemplates.xml、fckconfig.js、*.PHP 這幾個檔案,而其他&_*都可以刪掉。

2.
上傳檔案預設是使用asp,如果要用php,打開fckconfig.js將
var _FileBrowserLanguage = ‘asp’ ;
var _QuickUploadLanguage = ‘asp’ ;
改為
var _FileBrowserLanguage = ‘php’ ;
var _QuickUploadLanguage = ‘php’ ;
並加上
FCKConfig.QuickUploadLanguage =  ‘php’;

3.
上傳的預設資料夾是\wwwroot\UserFiles\
如果要更改,打開\FCKeditor\editor\filemanager\upload\php\config.php
修改下面的參數
ConfigUserFilesPath = “/UserFiles/”

4.
分別到 
/editor/filemanager/browser/default/connectors/php/config.php
/editor/filemanager/upload/php/config.php
Config[‘Enabled’] = false => Config[‘Enabled’] = true
UserFilesPath 設定網站相對路徑

5.
若要自訂工具列,打開fckconfig.js
修改下面這一段,把不想要的拿掉。

FCKConfig.ToolbarSets[“Default”] = [
[‘Source’,’DocProps’,’-‘,’Save’,’NewPage’,’Preview’,’-‘,’Templates’],
[‘Cut’,’Copy’,’Paste’,’PasteText’,’PasteWord’,’-‘,’Print’,’SpellCheck’],
[‘Undo’,’Redo’,’-‘,’Find’,’Replace’,’-‘,’SelectAll’,’RemoveFormat’],
[‘Form’,’Checkbox’,’Radio’,’TextField’,’Textarea’,’Select’,’Button’,’ImageButton’,’HiddenField’],
‘/’,
[‘Bold’,’Italic’,’Underline’,’StrikeThrough’,’-‘,’Subscript’,’Superscript’],
[‘OrderedList’,’UnorderedList’,’-‘,’Outdent’,’Indent’],
[‘JustifyLeft’,’JustifyCenter’,’JustifyRight’,’JustifyFull’],
[‘Link’,’Unlink’,’Anchor’],
[‘Image’,’Flash’,’Table’,’Rule’,’Smiley’,’SpecialChar’,’PageBreak’,’UniversalKey’],
‘/’,
[‘Style’,’FontFormat’,’FontName’,’FontSize’],
[‘TextColor’,’BGColor’],
[‘FitWindow’,’-‘,’About’]
] ;

或是修改FCKConfig.ToolbarSets[“Basic”]裡面的內容。
‘/’=>斷行

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>