本文整理汇总了PHP中CKEditor::replaceAll方法的典型用法代码示例。如果您正苦于以下问题:PHP CKEditor::replaceAll方法的具体用法?PHP CKEditor::replaceAll怎么用?PHP CKEditor::replaceAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKEditor
的用法示例。
在下文中一共展示了CKEditor::replaceAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CKEditor
<textarea cols="80" id="editor2" name="editor2" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
</p>
<p>
<input type="submit" value="Submit"/>
</p>
</form>
<div id="footer">
<hr />
<p>
CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
</p>
<p id="copy">
Copyright © 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
Knabben. All rights reserved.
</p>
</div>
<?php
// Include the CKEditor class.
include "../../ckeditor.php";
// Create a class instance.
$CKEditor = new CKEditor();
// Path to the CKEditor directory, ideally use an absolute path instead of a relative dir.
// $CKEditor->basePath = '/ckeditor/'
// If not set, CKEditor will try to detect the correct path.
$CKEditor->basePath = '../../';
// Replace all textarea elements with CKEditor.
$CKEditor->replaceAll();
?>
</body>
</html>
示例2: CKEditor
function ckeditor_replace($class = 'ck_editor')
{
$ckeditor = new CKEditor(Config::get('ckeditor.basepath'));
return $ckeditor->replaceAll($class);
}