Add-ons / Plug-ins
Change log
- 1.5 - Compatibility update
- 1.4 - Updated CKEditor release
- 1.3 - Minor bug fixes
- 1.2 - Fix for paths on Windows servers
- 1.1 - Enabled image upload capability
- 1.0 - Initial version
CKEditor is a text editor to be used inside web pages. It’s a WYSIWYG editor, which means that the text being edited on it looks as similar as possible to the results users have when publishing it. It brings to the web common editing features found on desktop editing applications like Microsoft Word and OpenOffice.
This package is a straight, unmodified distribution of the Open Source version of CKEditor with standard options, with the addition of a configuration file for Perch and an uploader.php file which enables image upload.
Installation
- Unzip the file contents and place the
ckeditorfolder intoperch/plugins/editors
Editor plugins can be used on any textarea field. Set the following options (alongside the standard ID, label, etc):
<perch:content type="textarea"
editor="ckeditor" html="true" />Image upload configuration
By default images uploaded via the image upload script will resize down to 640 pixels wide. To change this you can add some configuration options in /perch/config/config.php
define('PERCH_EDITORIMAGE_MAXWIDTH', 400);
define('PERCH_EDITORIMAGE_MAXHEIGHT', 300);
define('PERCH_EDITORIMAGE_CROP', true);PERCH_EDITORIMAGE_MAXWIDTH is the maximum width an image will resize down to if a larger image is uploaded. Can also be set to false.
PERCH_EDITORIMAGE_MAXHEIGHT is the maximum height. Can also be set to false. If either height or width are set a resize will happen, maintaining the ratio.
PERCH_EDITORIMAGE_CROP can be set to true or false, depending on if you want the image cropped to the set width or height (needs both width and height set).
File upload
The upload functionality also works for file upload using the link icon in the editor toolbar. Images and files are uploaded to the /perch/resources folders as usual.
