Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. public function index() {
  2. // $path = base_url().'js/ckfinder';
  3. $path = 'js/ckfinder';
  4. $width = '850px';
  5. $this->editor($path, $width);
  6. $this->form_validation->set_rules('description', 'Page Description', 'trim|required|xss_clean');
  7. if ($this->form_validation->run() == FALSE) {
  8. $this->load->view('welcome_message');
  9. }
  10. else {
  11. // do your stuff with post data.
  12. echo $this->input->post('description');
  13. }
  14. }
  15. function editor($path,$width) {
  16. //Loading Library For Ckeditor
  17. $this->load->library('ckeditor');
  18. $this->load->library('ckfinder');
  19. //configure base path of ckeditor folder
  20. $this->ckeditor->basePath = base_url().'js/ckeditor/';
  21. $this->ckeditor-> config['toolbar'] = 'Full';
  22. $this->ckeditor->config['language'] = 'en';
  23. $this->ckeditor-> config['width'] = $width;
  24. //configure ckfinder with ckeditor config
  25. $this->ckfinder->SetupCKEditor($this->ckeditor,$path);
  26. }