How to install and integrate CKEditor to CakePHP?
- Download CKEditor from www.ckeditor.com
- Copy files from the zipped folder to "webroot/js/ckeditor/"
- 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. - Create the textarea and give it a class named "ckeditor"
<?php echo $this->Form->textarea('content',array('class'=>'ckeditor'))?>
0 comments:
Post a Comment