Quick Tags for comments
Since Alex released his js quick tags - it seemed like the perfect thing to add to the comments form so that people could put in the html tags more easily. However, while his script is really powerful - just for the comments form, it's more than what's needed. So I stripped it down to the most basic version - using only the most common HTML tags used in comments - italic, bold, and links.
Here are the instructions on how to integrate it into your (wordpress) comments:
First and foremost - if you want to add code, or use the full version - you can download that from Alex's site.
To use the "mini" version I made:
1) Download the js file and upload it to the root of your domain.
2) Open up your wp-comments.php page… Look for the beginning of the comments form - (search for <form in the file) and put this just above it:
<script src="/js_quicktags-mini.js" type="text/javascript"></script>
Look for the text area field for comments which looks like this <textarea name="comment" id="comment" cols="40" rows="6" tabindex="4"></textarea> and add this directly above it:
<script type="text/javascript">edToolbar();</script>
And add this BELOW the textarea field:
<script type="text/javascript">var edCanvas = document.getElementById('comment');</script>
This is the method I'm using on this site - although I added the "h3" tag just for the one I use, since that's what I use to stylize code on this site. You can easily add more… or start from scratch using Alex's.
June 10th, 2004 at 8:55 pm
these are great! it definitely makes it easier for commenters and i think it looks better than having that list of "tags you can use." it really cleans up the page!
Scripty does it again! =)
June 14th, 2004 at 10:08 am
Hehe..Customising this script must be the 'flavour of the week' atm. I made this version, which is stripped down to just the dictionary function and a thesaraus function which I added. I've used it already for a personal project and found it indespencable [if you had the dictionary function I would have spelled that correctly :p]
June 19th, 2004 at 11:47 am
Nice Hack
June 21st, 2004 at 9:19 pm
July 3rd, 2004 at 8:57 pm
How come your buttons are nice and rounded? Mine don't look like that at all. *scratches head*
July 3rd, 2004 at 9:03 pm
You probably have a style applied to input tags - that will automatically square-off the corners. (I don't have any styling to input tags)
July 7th, 2004 at 8:01 pm
Rather than ping ScriptyGoddess multiple times and clog my sideblog with even more WordPress links, I decided to plop 'em all here. I'm going to give WordPress a try again on my course website, since there are various hacks that…
July 8th, 2004 at 6:54 pm
Thank you Jennifer…man…I'm getting a ton of good scripts of here. Tell ya, I'm very greatful.
July 14th, 2004 at 11:24 pm
Another very helpful hack from you.
Thank you!!
August 24th, 2004 at 3:14 pm
Jennier - I am using this script and its great. But I also want to be able to use the
strikethroughin comments. How would I go about adding that to the list? Your help would be very grateful. Thank you.August 24th, 2004 at 9:18 pm
Poonam - give this a try. In that .js file, you'll see a few other "edButton" definitions. Add this one after the last one (which in my file is the one to make links) :
edButtons[edButtons.length] = new edButton('ed_strike', 'strike', '<strike>', '</strike>');
I haven't tested it, but that should work.
August 24th, 2004 at 9:22 pm
Thank you so very much Jennifer! You are the best! I tested it and it works fabulously!
Thank you again!