Rss Feed
  1. Enable CK editor in CakePHP

    Thursday, 4 April 2013

    How to install and integrate CKEditor to CakePHP?  
    1. Download CKEditor from www.ckeditor.com
    2. Copy files from the zipped folder to "webroot/js/ckeditor/"
    3. In the view where you want to display the editor, put the following script on the top of the page (or somewhere before textarea which you want to contain editor):
      <?php echo $this->Html->script('ckeditor/ckeditor');?>
      This scipt will include the "webroot/js/ckeditor.js" file to your view.
    4. Create the textarea and give it a class named "ckeditor"
      <?php echo $this->Form->textarea('content',array('class'=>'ckeditor'))?>
     The editor is now displaying instead of raw textarea.

  2. 0 comments:

    Post a Comment