Question for folks concerning RTEs
I've decided to stop griping and finally add a rich text editor to BlogCFC (as an option of course). I'm looking into TinyMCE first with possible support for CKEditor as well. Some things have cropped up though that worry me.
First off - it is a bit difficult to get tinymce to ignore certain elements, like the more tag. I could simply add a new form field to the editor that would be used for all the text you would normally place before the more - I could name this the excerpt which is really what it is.
Code blocks are more worrisome though. I've looked at a Mango plugin for it, and while it isn't quite working for me, I assume I'll get it there eventually, but it begs the question:
If code blocks just don't work well in tinyMCE, would folks be ok with not being able to use tinyMCE? I figure it would still be a useful feature for BlogCFC users of a non-technical nature. They can use all the pretty buttons, make nice blog entries, etc. Those of us who normally need code blocks can handle HTML ourselves typically.
Thoughts?
Be nice if we just check box in admin to select using an RTE/which RTE. Now if only you had someone to help....
Example1
content_css : "css/wysiwyg.css"
The path is a relative path, so change it accordingly (keep in mind that this is being called from a client-side application - javascript) and the css file can be named whatever you want (I like wysiwyg.css so that in case I end up with many css and xls files, I know exactly what this one is for). Then you can put simple styles in the css file to represent your site output. examples: code, p, h1, h2, table, etc.
I suggest giving the admin the ability to point to their own css file so that they can create a custom css file that represents the styles on their website (so what they see in the editor is "exactly" how it will appear on the website.
As a side note: I also like to add:
Example2
theme_advanced_styles : "Float left=floatLeft;Float right"
This allows me to have a couple simple styles that the content editors can apply to things like images (not overwhelming them with choices, but floating images is a common request). In the examples above, my classes are called .floatLeft and .floatRight, but the text the user sees in the dropdown is "Float left" and "Float right".
Also, you may want to customize the dropdown for blocks (so you can make things like "code" appear). Example:
Example3
theme_advanced_blockformats : "h1,h2,h3,h4,h5,h6,p,blockquote,address,dt,dd,code"
PS
While tinyMCE is nice why not FCK editor and or what if I as a laymen person would want to implement either one of them myself. Can anyone share me a tutorial on how to do it on CFC blog
The code blocks are for posting sample code as content in the blog. They are treated differently as they are just meant for display and not execution. Hope that helps.
Just curious as to why TinyMCE over CKEditor. I only really have experience with CKEditor so I'm just curious as to what I'm missing at on.
@Anthony: John answered you. They are meant for code listings. This is described in the BlogCFC documentation.
A few months ago I was tweaking (messing up) your textarea.cfm tag and implementing a slimmed down version of fckeditor. I believe that it's safe to use on the admin side cuz in theory you shouldn't have to worry about who is using the file manager (coldfusion 8 introduced some security holes i recall by using fckeditor as a built in rte). If i use the latest fckeditor and slim it down it integrates quite well and plays nice with your "more, code, and textblock" tags. If you're interested I could send it to ya..
That's my two cents...
Josen