SSWI — When in doubt, buff it out.

Live Preview for comments,

Written in Frisco, TX on March 15, 2004 and tagged with .

30 Comments, 0 Tweets, why not add one?

I have ported at hack from MT to Wordpress that gives you live previewing of comments.

The hack is simple to implement and loads of fun at parties!  Here you go:

I have moved the hack to this file since it was pretty lengthy, and it was screwing up my validation.  The file is well commented so you shouldn’t have a problem.

And there you have it.  You can see it at work on this site, just leave a comment.

If you post about this on Twitter, please use the hashtag #silly307.


personal avatar

Elaine, on March 1, 2007

Firefox on Linux seems to work.

personal avatar

rolandog, on March 1, 2007

Also testing for fun. Great plugin. Thanks for coding it =).

personal avatar

Philippe Worontzoff, on March 1, 2007

Ok, I’ll inform you when the first version will be released.

personal avatar

Philippe Worontzoff, on March 1, 2007

Hi,

I’m developping a CMS and I’ve been inspired by this great plugin for the “post-preview” of it.

I just wander about the license… WordPress is under GNU GPL, so, I suppose (as “derivate works” from software under GNU GPL have to keep the same license) that this plugin is also under GNU GPL. That would by great as my CMS is under GNU GPL.
Could you tel me if this plugin is under GNU GPL as a matter of fact or not and, if not, under witch license is it (if there is one) ?
Thanks in advence for your reply.

personal avatar

Karl Bedingfield, on March 1, 2007

Hmmm the links appears to be dead to the file.

Karl

personal avatar

Chris J. Davis, on March 1, 2007

Hey Phillip,

Indeed this plugin is released under the GNU GPL, as well as a Creative Commons License. Under both it is okay for you to add it to your CMS.

The only thing I ask other than the appropriate attribution is that you let me know when your CMS is done so I can check it out!

Good luck,

Chris

personal avatar

Janie, on March 1, 2007

Just looking around, i like this live preview….

personal avatar

paul haine, on March 1, 2007

Something else I’ve just noticed; while in Internet Explorer, if you try typing an HTML tag that’s not allowed (for instance, you could try typing <address> here on this page), it generates an ‘unknown runtime error’.

personal avatar

Karl Bedingfield, on March 1, 2007

Great stuff thanks :)

personal avatar

HardinComp, on March 1, 2007

Okay, thanks. I thought about creating a separate stylesheet and simply linking it into each page type, but I decided to just go this way. I may change my mind at some point in the future.

personal avatar

HardinComp, on March 1, 2007

I love this plugin! I only have one problem with it: I can’t get some custom styles I use on my post pages to be used in the preview area when I’m writing a post. I’ve added them to my wp-admin.css file, but there’s one or two that just will not show up in the preview. The biggest problem is:

.SmallFont { font-size: .9em; }

I use this class frequently, and it works like a charm in my published posts. Does anyone have any ideas why I can’t get it to work in my post previews?

personal avatar

Chris J. Davis, on March 1, 2007

Sorry Karl, the link is fixed now.

personal avatar

Chris J. Davis, on March 1, 2007

Hey Hardin,

That is a good question, and other than what you are doing there is no way currently.

I might look into hacking something like a custom Stylesheet URI into a newer version of the plugin, but I am not sure… stay tuned.

personal avatar

Angsuman Chakraborty, on March 1, 2007

Huh! Looks like my last comment was gobbled up. That is strange!

personal avatar

Angsuman Chakraborty, on March 1, 2007

This is very useful. Thanks.

personal avatar

Dustin Wyatt, on March 1, 2007

This is a very nice plugin. I’m more interested in the live post preview than the comment previews. Definitely going to try this out.

Here's some code Here’s some bold

personal avatar

pocket, on March 1, 2007

This preview thing is pretty neat….

personal avatar

BillSaysThis, on March 1, 2007

I definitely need more information on where to add the JavaScript. I looked at the source of this page, for instance, and didn’t see any call to commentScript().

personal avatar

BillSaysThis, on March 1, 2007

Just testing… Oooh look at the pretty dots and letters. Very nice.

personal avatar

Bilal, on March 1, 2007

So this doesn’t work in Internet Explorer, right?

personal avatar

Kahil, on March 1, 2007

i’ve tried everything that i’ve read in the comments here, but I can’t get this plugin to work…

i’ve added it to the plugins folder, activated it…..that didn’t work…so i looked at the php file… i tried adding the script where it says to, but all that did was add that text to the page or distort it… what do i have to do to get it to work? i’m using the default theme in wordpress 1.5… is there a specific place i have to add something to? i’m new with all this stuff and am trying to figure it out….with no luck..

personal avatar

testmonster of doom, on March 1, 2007

I’m testing it to teh limit, yo!

personal avatar

testmonster of doom, on March 1, 2007

is the “welcome back testmonster of doom” (change) thing a new part of wordpress? or are you using a plugin? it’s pretty snazzy!

personal avatar

John Stone, on March 1, 2007

Neat.

personal avatar

Grace, on March 1, 2007

Hello! Just testing. :) I don’t see it. Maybe it has already been disabled.

personal avatar

Ziim, on March 1, 2007

Blaa bla. Just writing to see if it works. And it does, perfect.

personal avatar

Chris J. Davis, on March 1, 2007

This should work fine on IE

personal avatar

Jared White, on March 1, 2007

Hey, this is really cool! I’ll try it out on my own WordPress blog soon.

personal avatar

Elriowiel, on March 1, 2007

This is so cool! I was expecting those “click to preview comment” things. I think I’ll use this on my site. :D

personal avatar

Jenny, on March 1, 2007

does this work with wp 1.5x?