Integrating CK Editor with CakePHP
CkEditor is the new WYSIWYG editor from the maker of FckEditor – which has been one of the best editors around for a while now.
To use CkEditor instead of a boring old textarea input in your cakephp views all you have to do is follow these very simple instructions.
1. Download the editor from http://ckeditor.com/download
2. Unzip it and put the ckeditor directory into your webroot.
4. tell your view to include the ckeditor/ckeditor.js fileShow Plain Text
- link('/ckeditor/ckeditor', false);?>
- echo $content_for_layout;
6. replace your textareas with CkEditors by class name by adding the classname ‘ckeditor’ to your input.Show Plain Text
- echo $form->input('content', array('class'=>'ckeditor'));
Hopefully thats got you a nice wysiwyg with all the buttons etc. Ckeditor is easy to configure to give your users as much or as little creative freedom as you need. Enjoy!
If you think there is a better way, or have a sugestion, post a comment and let me know.