I use these steps to add ckeditor to my encoding applications:
1) Download these files:
2) Copy the files you just downloaded to the Applications / libraries folder
3) Download the ckeditor assistant here: http://pastebin.com/Cd3GqYbx
4) Copy the last file to the application / helper folder as ckeditor_helper.php
5) Download the CKeditor controller here: http://pastebin.com/UD0bB9ig
6) Copy the controller to the application folder / controllers as ckeditor.php
7) Download the main ckeditor project from the official website: http://ckeditor.com/download/
8) Copy the ckeditor folder, which you just upload to your resources folder (if you want, you can also download the ckfinder project and put it in the same folder)
9) Add this js line to the view file (adjust the path):
<script type="text/javascript" src="/asset/ckeditor/ckeditor.js"></script> <script type="text/javascript" src="/asset/ckfinder/ckfinder.js"></script>
10) In your controller add this php code and configure the path:
$this->load->library('ckeditor'); $this->load->library('ckfinder'); $this->ckeditor->basePath = base_url().'asset/ckeditor/'; $this->ckeditor->config['toolbar'] = array( array( 'Source', '-', 'Bold', 'Italic', 'Underline', '-','Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo','-','NumberedList','BulletedList' ) ); $this->ckeditor->config['language'] = 'it'; $this->ckeditor->config['width'] = '730px'; $this->ckeditor->config['height'] = '300px';
11) In your view, type the editor using:
echo $this->ckeditor->editor("textarea name","default textarea value");