A fuelPHP drop-in package for CKEditor.
Installation:
- Download CKEditor here.
- Copy the ckeditor folder from the download archive into your public javascript folder.
- Download the FuelPHP CKEditor package here.
- Drop the CKEDitor fuel package into fuel/packages.
- Open up fuel/packages/ckeditor/config/config.php in your favorite editor.
- Set the basepath option to the web path to your CKEditor javascript. The default path is (public)/assets/js/ckeditor.
- Set the toolbar option to your preferred set of editor buttons.
- Add any additional editor options.
Usage:
Load the class:
if(!Package::loaded('CKEditor'))
Package::load('CKEditor');
(Optionally, you can autoload the class. See the FuelPHP documentation for more information)
Render the editor:
echo ckeditor($text_area_name, $default_value, (array) $options, (array) $events);