說真的,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時,省了很多的時間,官方文件說真的,給的不夠,很多人看不太懂範例,那要用這套文書編輯器,還是有一點門檻的。
隨機文章
- Linux環境下,安裝instaloader,出現error: externally-managed-environment (2024-11-11)
- 開心農場 開心農民 (2009-12-10)
- 是的!我家的台灣固網又掛了 (2011-12-17)
- 從Proxmox VE 搬到XCP-NG 8.2上 Windows 顯卡不正常的處理 (2021-01-05)
- isc-kea使用python進行管理,相關測試 (2024-07-05)








