sfagnum/kohana-ckeditor

WYSIWYG CKEditor 集成模块,用于 Kohana 框架。

dev-master 2013-11-29 21:42 UTC

This package is not auto-updated.

Last update: 2024-09-24 01:56:25 UTC


README

CKEditor 集成模块,适用于 Kohana 3.3

示例

在你的控制器中

class Controller_Abstract extends Controller_Template
{
    public $template = 'layouts/main';

    function before()
    {
        parent::before();
		$this->template->editor = '';
    }
    function after()
    {
    	$this->template->editor = Ckeditor::instance();

    	parent::after();
    }

在你的 'layouts/main.php' 文件中添加:```html <title>Cool site</title> editor('name', 'Lorem ipsum...', array('width' => 400)); ?> ```