<?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 = CIHOTEL_BASE + 'js/ckeditor/';
    CKFinder::SetupCKEditor($ckeditor, CIHOTEL_BASE . 'js/ckfinder/');
    
    $CKEditor->config['width'] = "600px";
    //$CKEditor->textareaAttributes = array("cols" => 80, "rows" => 10);
    log_message('info', 'display_ck:' . $initialValue);
    $ckeditor->editor($data['id'], $initialValue);
}
