說真的,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時,省了很多的時間,官方文件說真的,給的不夠,很多人看不太懂範例,那要用這套文書編輯器,還是有一點門檻的。
隨機文章
- 2007台北車展 雷歐帝斯作品 2/6 (2008-01-04)
- 台灣真的是發展資金公司的好地方 (2016-12-30)
- 不容少數不法濫權檢察官傷害全體檢察官的聲譽 (2008-01-06)
- 蔡力行:華碩EeePC 下個億台產品 (2007-11-10)
- 媽, 再見 (2008-08-30)








