My blog is WP3.1.2, theme: Twenty Ten
I would like to add a strip of visual editor on top of the comments box (something like you see at the top of question box on this site). How can I do it WITHOUT PLUGINS?
I have searched this site and the WP forums, but could not find something I could use.
Although WP displays html tags beneath the comments box that people can use to style their comments. But not everybody is fimiliar with them and how to use them. So instead I woild like to display a strip of tags for people to use easily.
Simple to follow instructions please. Thanks.
Simple-to-follow instructions would be something like:
Plugin
But for some reason, you have specified that you want to do it “WITHOUT PLUGINS”. Further, you have specified “simple to follow instructions”.
I do not believe your requirements are compatible. If you want “easy to follow instructions”, then use a Plugin. If you don’t want to use a Plugin, then you’ll have to figure out how to replicate the (non-trivial, and thus, not really “easy to follow”) implementation in such a Plugin.
Why do you not want to use a Plugin?
Maybe somebody can grab this and run with it….It’s a mostly (I think) finished slop of code from various places. I would credit if I remebered where parts came from….
So here’s what it do. We load up all the crap we need for tinymce. But tinymce allows for html tags which WP doesn’t allow from the front end. So we need to account for em. Then at the bottom we need to add the theEditor class to the comment form. Since I use commentform in my theme, I can hook into it. If you don’t, you can add the class directly to the textarea.
This adds the editor to the comment form. But the work isn’t done. It looks like crap, and I got bored working with it. Maybe someone can make it look nice, I dunno if it’s just css conflicts or what.
Also, all the html tags we allow now get listed under the comment form in the allowed tags section. Probably best to hide them completely, that info isn’t needed anyway if you get the tinymce working.
It still needs work, and only works as is when logged in….. so if you can find a plugin, that may be the way to go I’d say