說真的,FCKEditor和新版的CKEditor在整合CKFinder上真的有差異,而且還差異蠻大的。
整合動作1
修改 CKEditor的config.js,增加CKEditor要讀取檔案路徑的設定,這樣才能順利的讀Image(JPG,GIF,BMP,PNG)和Flash以及檔案。
整合動作2
修改CKFider的config.js
把相關的設定設定好,才能上傳檔案,對於相對路徑和絕對路徑的概念清楚一點比較好
整合動作3
沒有了,就是進到程式中去呼叫CKFinde和CKEditor,進行相關的設定。
CKEditor整合CKFinder在php中的宣告方式
$CKEditor = new CKEditor();
$CKEditor->returnOutput = true;
$CKEditor->basePath = ‘CKEditor的路徑’;
$CKEditor->config[‘width’] = 800;
$CKEditor->textareaAttributes = array(“cols” => 80, “rows” => 20);
CKFinder::SetupCKEditor( $CKEditor, ‘CKFinder的路徑’);
$initialValue = ‘<p>請在這邊輸入內容</p>’;
$code = $CKEditor->editor(“editor1”, $initialValue);
FCKEditor整合CKFinder在php中的宣告方式
$fckeditor = new FCKeditor( ‘FCKeditor1’ ) ;
$fckeditor->BasePath = ‘CKEditor的路徑’ ;
$fckeditor->Value = ‘<p>請在這邊輸入內容</p>’ ;
$fckeditor->Config[‘EnterMode’] = ‘br’;
$fckeditor->Width = ‘800’;
$fckeditor->Height = ‘600’;
CKFinder::SetupFCKeditor( $fckeditor, ”CKFinder的路徑’ ) ;
CKEditor和 FCKEditor程式撰寫上也是有差異的,宣告方式完全不同,而且差蠻多的,我看,我還要花很多時間來練習一下。因為文字輸入區的部份,已經變成文字區域了textarea了,與先前有所不同。
不過,這次使用CKEditor整合CKFinder比上次FCKEditor整合CKFinder時,省了很多的時間,官方文件說真的,給的不夠,很多人看不太懂範例,那要用這套文書編輯器,還是有一點門檻的。
隨機文章
- 阿童木 原子小金剛 觀後感 (2009-12-25)
- 經濟成長,為什麼民眾感受不到? (2008-01-07)
- 我不喜歡最近幾台新手機的設計 (2015-08-14)
- 免費域名管理服務幫您 (2008-06-05)
- ASUS Eee PC正式在港發售 首批500部10分鐘內全部售罄 (2007-11-03)








