This is a CKEditor fieldtype add-on for Statamic.
It has been tested with Statamic v1.7.1.
This fieldtype clashes with the Redactor fieldtype. Once you have installed it and use a Redactor field, the field will show the CKEditor toolbar on field focus.
I made this add-on to replace Redactor, so this is not an issue for me. If you want to keep using Redactor in your publish forms, feel free to put on your de-bugging pants and dive into the code to fix this. Do please let me know of the solution when you come across it :)
Upload the ckeditor
folder to your Statamic's _add-ons
folder.
By default the editor comes with the whole shebang of toolbar buttons. If you dislike red and yellow highlighted text as much as me and don't want your client going editing crazy, you'll probably want to change this.
Open _add-ons/ckeditor/config.js
and refer to lines 12 - 20 and lines 24 - 43. They contain examples of how you can customise the styles dropdown and the available buttons in the toolbar. Uncomment them, change them, delete them - the editor configuration world is your oyster!
Refer to the CKEditor documentation for more help and options.
If you want to allow users to add links to files or to add images to the text, you can use the Filemanager add-on.
Once you have that installed and configured, open _add-ons/ckeditor/config.js
and uncomment the code on lines 47 and 48.
If you are running Statamic in a subdirectory, follow these steps:
- Open
_add-ons/ckeditor/config.js
. - Add your subdirectory to the CSS path on line 7.
- If you are using Filemanager, add your subdirectory to the file browsers paths on lines 47 and 48.
Declare type: ckeditor in your fieldset settings.
- Enable field settings for a basic/complex toolbars and width/height declarations