views:

150

answers:

1

I'm attempting to install CKeditor on Kohana 2. I've dropped the ckeditor folder into libraries/ and put ckeditor.php alongside the ckeditor folder in libraries/. I'm trying to call ckeditor in my controller with the following:

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

I'm getting the following error and having a hard time solving it:

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

+2  A: 

well its simple: there is no such function in the CKEditor class.

also found this in comments:

 * 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;
antpaw