<?php
if(!defined('BASEPATH')) exit('No direct script access allowed');

/*
 * CKEditor and CKFinder helper for CodeIgniter
 */
require_once(FCPATH . 'js/ckeditor/ckeditor.php');
require_once(FCPATH . 'js/ckfinder/ckfinder.php');

function display_ck($data, $initialValue)
{
    $ckeditor = new CKEditor();
    $ckeditor->basePath = '/ci-hotel/js/ckeditor/';
    CKFinder::SetupCKEditor($ckeditor, '/ci-hotel/js/ckfinder/');
    $CKEditor->config['width'] = "600px";
    //$CKEditor->textareaAttributes = array("cols" => 80, "rows" => 10);
    log_message('info', 'display_ck:' . $initialValue);
    $ckeditor->editor($data['id'], $initialValue);
}
