2010-07-18 80 views
1

我试图在Kohana 2上安装CKeditor。我已将ckeditor文件夹放入库中,并将ckeditor.php放在库中的ckeditor文件夹旁边。我想打电话的CKEditor在我的控制器有以下:在Kohana中安装CKeditor的问题(v2)

$this->ckeditor = new Ckeditor('FCKEDITOR1'); 
$this->ckeditor->BasePath = 'application/libraries/ckeditor/'; 
$this->ckeditor->value = 'This is some <strong>sample text</strong>.' ; 
$this->ckeditor->create(); 

我收到以下错误,有一个很难解决它:

Fatal error: Call to undefined method CKEditor::create() in [path redacted]/app-admin/controllers/blog.php on line 18

回答

3

以及其简单:没有这样的功能在CKEditor类中。

也发现了这个在评论:

* Example 1: get the code creating %CKEditor instance and print it on a page with the "echo" function. 

* $CKEditor = new CKEditor(); 
* $CKEditor->returnOutput = true; 
* $code = $CKEditor->editor("editor1", "<p>Initial value.</p>"); 
* echo "<p>Editor 1:</p>"; 
* echo $code;