說真的,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時,省了很多的時間,官方文件說真的,給的不夠,很多人看不太懂範例,那要用這套文書編輯器,還是有一點門檻的。
隨機文章
- 社區寬頻 的用戶 架設VPN 連回家? (2020-09-21)
- 取消交易次數很多的賣家:95手機讚,便宜有個X用,反正又不一定買的到手機 (2012-04-26)
- 元大銀行 你們搞笑嗎?我不是退刷,是PAYPAL訂單不不成立 (2018-10-23)
- 輸入地址畫出Gmap地圖的做法 (2011-11-25)
- 金橋取得廣達OLPC RF天線訂單 11月起出貨 明年擴產倍增 (2007-11-03)


![[ChatGPT] 4o的圖片視覺測試](https://chihping.aflypen.com/wp-content/uploads/2024/09/eye-4367141_640-300x200.jpg)

![[chatGPT 測試] 評測開箱 Synology DS918+](https://chihping.aflypen.com/wp-content/uploads/2023/03/hdd-g6fc6f0659_640-300x228.png)



