I spent quite a bit of time trying to get this to work the way I want, not with complete success, so I just thought I would set out what I found to save others some time and solicit input from others more able than I.
Unless I am much mistaken, I imagine what I want it to do is pretty similar to what others want it to do, but for the sake of clarity here is what I want:
1. it should read my site’s css file and display the editable content formatted accordingly
2. It should allow the user to select styles from my site css file to apply to content they create
I haven’t been able to achieve this and, if anyone has I would really like to know how they did it.
However, I agree with others that CKeditor seems a superior editor - especially for enabling content editing for end users. It’s clean, effective and is easy to restrict the functionality available to an appropriate sub-set.
I am running modx evo 1.0.4. with the default selection of all the bits but no sample site. I installed CKeditor by following the instructions at
http://codingpad.maryspad.com/2010/02/21/setting-up-ckeditor-on-modx-evolution/
which uses the package provided by Yama - but note that the image pointed to here
http://code.google.com/p/modx-ja/downloads/detail?name=ckeditor31-test.zip is deprecated and has been superceded by
http://code.google.com/p/modx-ja/downloads/detail?name=ckeditor331-alpha.zip
...which is the version I used. I installed following the instructions at maryspad and that all went fine. I have a working editor that I can use in the manager or within quickmanager, and I can load images from within it - though that seems to hand over to the FCKeditor resources browser integrated in evo to do the work.
I can also customise the functionality set of the editor. The file
/assets/plugins/ckeditor/modx_config.js contains three configs: config.toolbar_modx, config.toolbar_full and config.toolbar_simple. I haven’t figured out how to switch between these, but I have found that if I hack the list at config.toolbar_modx, that gets applied.
So far as trying to get it to read my CSS goes, einsteinboi posted a link to
http://www.gregorysmart.com/2010/02/25/modx-ckeditor/
which purports to enable this, but I could not get it to work.
Firstly I do not have the ckeditor/custom_config.php file referred to, and attempts I made to insert the code elsewhere were unsuccessful.
This is the bit I would really like to get to work, so if anyone knows how, please tell me!
There is documentation on styles at
http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Styles but the reference it makes to using an external styles definition file seems to be about defining styles to be implemented as inline code by the editor, rather than the editor understanding and displaying as indicated by an external style sheet. The file location it refers to is not present on my install. The minified JavaScript file on my install is at assets/plugins/ckeditor/ckeditor/plugins/styles/styles/default.js
The CSS setting CKEDITOR.config.contentsCss is documented at
http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.contentsCss
which leads me to believe that it should be possible to achieve what I want, but I have not yet had success!
I too dislike the output formatting applied as default by the editor. The doc at
http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Output_Formatting
indicates that there is a great deal of control available over this, but again I have not been able to implement this within the modx context and would welcome any guidance on how to do so. Now that Google is encouraging us to minify our code, my ideal would be that the output code was more or less minified but that it displayed as elegantly indented code when you click on the code button.
http://docs.cksource.com/ckeditor_api/ seems to be a good source of info.
Any guidance gladly accepted!