本文整理汇总了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() 動作完成設計步驟
示例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>"Browse Server"</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 © 2007-2014, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
</p>
</div>
</body>
</html>
示例3: testSetupFCKeditor
/**
* Tests CKFinder->SetupFCKeditor()
*/
public function testSetupFCKeditor()
{
// TODO Auto-generated CKFinderTest->testSetupFCKeditor()
$this->markTestIncomplete("SetupFCKeditor test not implemented");
$this->cKFinder->SetupFCKeditor();
}