當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CKFinder::SetupFCKeditor方法代碼示例

本文整理匯總了PHP中CKFinder::SetupFCKeditor方法的典型用法代碼示例。如果您正苦於以下問題:PHP CKFinder::SetupFCKeditor方法的具體用法?PHP CKFinder::SetupFCKeditor怎麽用?PHP CKFinder::SetupFCKeditor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CKFinder的用法示例。


在下文中一共展示了CKFinder::SetupFCKeditor方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: FCKeditor

<?php

require_once $_SERVER['SRVROOT'] . '/cms/admin/config/ini.php';
require_once $_SERVER['SRVROOT'] . FCK . 'fckeditor.php';
// 1. 以正確的絕對路徑 include fckeditor.php 主程式
require_once $_SERVER['SRVROOT'] . '/cms/lib/editor/ckfinder/ckfinder.php';
$oFCKeditor = new FCKeditor('content');
//2. FCKeditor 元件 具現化 new FCKeditor('表單欄位名稱')
$oFCKeditor->Width = '100%';
$oFCKeditor->Height = '200px';
$oFCKeditor->BasePath = WEBROOT . FCK;
//3.重要參數: 以 url路徑指定 FCKeditor 主程式所在位置
$oFCKeditor->ToolbarSet = 'myBasic';
//載入內容
$oFCKeditor->Value = $content;
CKFinder::SetupFCKeditor($oFCKeditor, WEBROOT . '/cms/lib/editor/ckfinder/');
$oFCKeditor->Create();
//4. 執行 Create() 動作完成設計步驟
開發者ID:kingwang317,項目名稱:it4fun-guam,代碼行數:18,代碼來源:ezEditor.php

示例2: FCKeditor

		the "Image" or "Link" icons and then the "<strong>Browse Server</strong>" button.</div>
	<p>
<?php 
include_once '../../../fckeditor/fckeditor.php';
require_once '../../ckfinder.php';
// This is a check for the FCKeditor class. If not defined, the paths must be checked.
if (!class_exists('FCKeditor')) {
    echo '<br><strong><span class="error">Error</span>: FCKeditor not found</strong>. ' . 'This sample assumes that FCKeditor (not included with CKFinder) is installed in ' . 'the "fckeditor" sibling folder of the CKFinder installation folder. If you have it installed in ' . 'a different place, just edit this file, changing the wrong paths in the include ' . '(line 31) and the "BasePath" values (line 47).';
} else {
    $fckeditor = new FCKeditor('FCKeditor1');
    $fckeditor->BasePath = '../../../fckeditor/';
    $fckeditor->Value = '<p>Just click the <b>Image</b> or <b>Link</b> button, and then <b>&quot;Browse Server&quot;</b>.</p>';
    // Just call CKFinder::SetupFCKeditor before calling Create() or CreateHtml()
    // in FCKeditor. The second parameter (optional), is the path for the
    // CKFinder installation (default = "/ckfinder/").
    CKFinder::SetupFCKeditor($fckeditor, '../../');
    $fckeditor->Create();
}
?>
	</p>
	<div id="footer">
		<hr />
		<p>
			CKFinder - Ajax File Manager - <a class="samples" href="http://cksource.com/ckfinder/">http://cksource.com/ckfinder</a>
		</p>
		<p id="copy">
			Copyright &copy; 2007-2014, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
		</p>
	</div>
</body>
</html>
開發者ID:pantasio,項目名稱:jollyany,代碼行數:31,代碼來源:fckeditor.php

示例3: testSetupFCKeditor

 /**
  * Tests CKFinder->SetupFCKeditor()
  */
 public function testSetupFCKeditor()
 {
     // TODO Auto-generated CKFinderTest->testSetupFCKeditor()
     $this->markTestIncomplete("SetupFCKeditor test not implemented");
     $this->cKFinder->SetupFCKeditor();
 }
開發者ID:ade24,項目名稱:vcorner,代碼行數:9,代碼來源:CKFinderTest.php


注:本文中的CKFinder::SetupFCKeditor方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。