MCEComments

Why the need of a preview box if you have the What You See Is What You Get Editor in the same place as your visitors type in the comments?

This plugin turns the comment field from a primitive <textfield> into a WYSIWYG editor, using the internal TinyMCE library bundled with 2.0 or up, without the need of another separate installation. Functions that only available to writers like adding images were removed and will not show up in the toolbar.

Consider a donation :) .


Current Version

0.4.5 – Download

Version History
0.4.5 – Compatible with WordPress 2.6.x; Fix a bug that cause JS regeneration doesn’t work

0.4.4 – Read here (Thanks ioannis!). Also the tooltips should be displaying correctly, and should support K2/AJAX Commenting.

0.4.3 – Support for WordPress 2.5. (gzip/cache for the script will be in 0.4.4)

0.4.2 – Support for K2 and other themes that uses AJAX Comment field, finally! (JQuery is time wasting, and it just doesn’t work for me) (And given that they are using onsubmit() to submit comments, not onclick() of the submit button!)

0.4.1 – Store comments in UTF-8 instead of HTML entities; Load TinyMCE only when there’s a comment form (Thanks José!)

0.4.0 – User supplied custom CSS; Modify interface a bit. Plugins of TinyMCE are now auto detected and can be added by clicking on the hyperlinks.

0.3.5 – Allow to change interface language; Subscript/superscript options; Allow user to add own plugins and buttons to the editor

0.3.0 – Increase loading speed; Fix IE7 disappearance of linebreaks

0.2.5 – Enable Firefox spell checking in the editor

0.2.0 – Newlines are correctly displayed and added a JavaScript function help adding text into TinyMCE editor

0.1.5 – RTL Text Support and allow to view HTML source

0.1.0 – Initial release

Instructions

The usual steps for installing and running a WordPress plugin:

  1. Download.
  2. Rename the extension from phps to php.
  3. Upload.
  4. Activate.

Known Issues

  1. Unwanted carriage return/newline/enter key were put into comment in older versions of Firefox. (Unconfirmed)
  2. Content inserted not within tags (for instance, WP Grins) are not removable by backspace. (Workaround: encapsulate in <span> tags, see updated instructions for WP Grins below)
  3. Message disappeared in submission using IE 6. (Unconfirmed)
  4. Compatibility with various comment-related plugins and customized themes. Please make sure the comment field is named “comment” and there are no other scripts that will interfere with it.

Working with WP Grins

Open wp-grins.php from the WordPress admin interface. Find

myField = $('comment');

Replace with

myField = document.getElementById('comment');
insertHTML('<span>'+tag+'</span>');
return;

Making TinyMCEComments works with other plugins

TinyMCEComments provides a JavaScript function insertHTML(text) which could be used by other plugins on the same page. It is used for inserting customized content generated by other plugins into the TinyMCE editor.

Compatibility with Akismet

Since there are some users receive complaints that the plugin increase the number of false positives of Akismet anti-spam, I sent a support request to Automattic recently. Here’s the conversation.

mk dot is dot here at gmail dot com wrote:
> Hello,
>
> I am the author of the plugin – TinymceComments for WordPress. My plugin
> just turns the comment area of the blog into a WYSIWYG editor, just like
> the one in the write page of the admin interface. Some users complains
> that if my plugin is turned on, many normal and healthy comments (without
> using special tags I suppose) were considered as spam by Akismet. I’m no
> anti-spam expert, so the only thing I can do is to ask for an advice. My
> plugin doesn’t have any server-side elements (except the admin interface)
> but purely rely on JavaScript. Mya you provide ideas so I could further
> investigate and solve the problem? Thanks in advance and I am looking
> forward to your reply.
>
> Yours,
> Thomas Au

Hi,
If this were all users then I think there would be a clear relationship somewhere.
As it is only some, and as it could therefore be any factor in their comment which causes this I don’t see that Akismet and your plugin are causing problems.


Mark

Though they claimed there are no clear relationships, I’ll continue test on this. And, if your blog is okay with both plugins activated, leave me a message :) .

Update: Seems I’m getting less comments eaten by the Akismet filter on my test blog (Here I use SK2). Either it could be Akismet getting used to it, or some other unknown factors acting behind the scene. Tell me your case if it’s different.

P.S.: This plugin is NOT designed to work with Live Comment Preview. Stop complaining about it.

P.P.S.: Please stop using this page as your testing ground, as the intention of the thread is for support request only. Set up a WordPress yourself, install the plugin, and enjoy yourself there. If you wish to report a bug or provide insightful and valuable comments, file your request here or e-mail me directly.

118 Comments

  1. Bob! says:

    Excellent feature, thanks for this. Testing it on my photoblog and will see if it gets any use :)

  2. thanks for this plugin, but sadly i cannot use it because then "WP Grins" (http://alexking.org/projects/wordpress) doesn't work anymore. but if you would be able to fix that…

  3. :sviatoi: says:

    Thank you very mutch for this plugin, it's work greatly))

  4. mk says:

    Martin:
    Unfortunately I can't think of a simple way to make this work with WP Grins. I need some time to study into it. Give me some time and wait for the release of version 0.2 :P

  5. mk says:

    Gene:
    Probably the plugin you mentioned is designed to work with a <textarea> but not a TinyMCE editor. Could you give me the link to the plugin's site so I could look onto the issue myself?
    And, about the space after the period. It behaves normally on the secod comment by you. Interesting. I'll look onto this further. Thanks.

  6. mk says:

    Gene:
    You could always reach me via mk dot is dot here at gmail dot com. Thanks!

  7. Kawamao says:

    Nice plugin, I like it very much. But I have use the plugin <a href="http://meidell.dk/archives/2004/09/04/nested-comments/">Brian's Nested Comments<a/> too, and can't work together.Would you tell me how to use it work together?….thx..:)

  8. Lior Haner says:

    I love the plugin, it works perfectly!I do have one problem, my blog is left to right (in Hebrew) and I would like the comments text to be left to right as well. I couldn't find where I can tweek that myself, any help will be greatly appreciated. Thanks in advance.

  9. au8ust says:

    Love it! Hope to see this plugin works with WP-Grin and Yahoo/MSN Style Smileys

     Cheer!

  10. hartlijn says:

    it does look very nice! unfortunenately it does'tn work with my Anarchy Media Player-plugin.

  11. Good idea but does (or can) this create security issues?

  12. mk says:

    Shawn:
    Probably not, because the comment content will finally be filtered out by WordPress itself. Actually this is purely JavaScript.

  13. I love this plugin — a very smart, simple and elegant solution.

    One question — I've noticed that suddenly long-time commenters are now ending up in Akismet's spam filter. Could this possibly have anything to do with TinyMCEComments? Or did Akismet just hiccup?

  14. regisseur says:

    Hi,
    It's seems that it's not working with WordPress 2.2

  15. mk says:

    David:
    Akismet doesn't use any JavaScript technique to determine if a comment is spam.. So it is unlikely the comments are affected by TinyMCEComments itself. Though your visitors may have a higher tendancy to add links in your comment :P

  16. mk says:

    regosseur:
    Umm.. The WordPress 2.2 installed on my machine works perfectly with the plugin. Maybe it is your theme or other plugins you've installed?

  17. Mike says:

    thanks for this plugin, is working great! Also with wp-grins :) (WP 2.2)

    one thing is would like to know, how kan i add options in the java part of the .php file to add the options to link to an image (the part you removed ;) ) i would like to have this function in my comments…

    tia

  18. buck says:

    Great plugin!

    Is it possible to add more buttons to the toolbar? I’d like to add quotes, images, ul, ol…

    would it be possible to add the toolbar to contact-form plugin and to bbpress post-forms?

  19. mk says:

    Mike,
    Though you could add an image button to the interface, but ultimately the image will be filtered out by WordPress itself because it may cause a security threat. (Think of anonymous users planting web bugs into your blog). You could do it by modifying the WordPress code itself, but I don't suggest to do it.

  20. mk says:

    Buck,
    It's possible to add buttons, but for the effects to appear in the final result the tags have to pass the sanity test given by WordPress. You may also ask other plugin developers to implement the support of this plugin. I have provide a simple API for that purpose.

  21. Buck says:

    Ok, thanks for your answer mk.

  22. Scott Tribe says:

    I like the plugin, but some of my readers who try to comment are finding 2 things:
     
    1) Some of them are getting carriage returns in paragraphs where they never have hit the "enter" button in the first place (which in my Wodpress admin editor, is showing up as the html < / b r > (no spaces of course, I'm just typing it out with spaces so it shows up to you)

    2) Others are telling me they are getting NO carriage returns when they hit enter – thus their comment looks like 1 big blob of text, and it can be quite unreadable.

  23. mk says:

    Hello Scott,

    I'm not sure if this is a bug from the WordPress TinyMCE Editor, by me, or by some other factors unknown. Do you really see </br> showing up in your admin interface and make sure it's not <br />? (Yes, you can type the tags here without spaces)

    And, could you provide more information, like the version of your WordPress installation, the browsers your readers are using (the larger the sample the better), as these information could help locate the source of the problem. Also could you give me permalinks that points to the problematic comments? Thanks a lot.

  24. Scott Tribe says:

    mk:

    I just posted an open thread at my site to do just that and leave some comments – and to leave their browser and what version it is. Those have just  started. (http://scottdiatribe.gluemeat.com/2007/06/05/open-comment-thread-test-postings/)

    As for my version of WordPress, it's 2.2… and as for the first part of your post, you're right.. it's <br /> I'm seeing. Here's an example of one comment with that problem which is showing </ br>'s at the end of every line.. or at least, what it reveals to me when I do an "edit comment" from WordPress:

     http://scottdiatribe.gluemeat.com/2007/06/03/what-a-shocker-not-were-parroting-the-us-on-climate-change-at-the-g8/#comment-4696

  25. Scott Tribe says:

    er.. I meant <br /> there of course, not </br>

    Anyhow, mk.. just as a followup to my last post.. it appears from the initial posts in the test thread and some of the prior blog comments in other threads and looking at my stats on my end (using FIrestats to see), that for the big globs of text that are being entered without carriage returns apparently being acknowledged, the persons are using IE – IE 7 in one case in the test thread mentioned prior, and apparently IE 6.0 in this comment.. which is here:

    No postings yet from people getting the inserted <br />'s yet..  I'll let you know when we get those.

  26. mk says:

    Scott,

    Thanks for your help and cooperation. I'll look into it and see if there's anything I can do.

  27. Scott Tribe says:

    mk: no problem.. thanks for looking into it.

    By the way, I've found from the one person who was getting <br />'s in his text when he hadn't even entered a "Enter" that he was using an older version of Firefox – 1.0.7

  28. Mike says:

    mk, thanks for the fast reply about the image stuff in the comments….

    now i got an other issue (not the one which Scott describes, yet anyway) with WP2.2 & WP-Grins & Firefox 1.5 & 2 (IE works fine). When inserting a smiley, i can't delete it with the backspace button. I have to press the backspace button, then the 'undo' comes on, and then the 'undo' removes the smiley…  hope you understand what i am trying to describe…

  29. I have a suggestion for your plugin page as far as search engine purposes go.  Break out the keywords (Tiny MCE Comments).  I searched for this plugin for over ten minutes and finally only found it after searching through the archives of WLTC. 

  30. Scott Tribe says:

    mk: no problem.. thanks for looking into it. By the way, I've found from the one person who was getting <br />'s in his text when he hadn't even entered a "Enter" that he was using an older version of Firefox – 1.0.7

  31. mk says:

    Ronald,

    I think making a unique keyword for this plugin is better than breaking into multiple existing keywords, or this page will be behind many existing pages with "TinyMCE" and "comments", which are both very common keywords.

  32. mk says:

    Scott,

    I think I've fixed the IE7 line break disapperance problem, but need a bit more testing to make sure I did it. For the one who get unexpected <br />'s, since I don't have 1.0.7 at hand, I will put the work in  lower priority and will fix the WP Grins compatibility first.

  33. Tomsn says:

    How can i add the Tinymcebar in a non-standard Theme? only Pluginaktivate have no effect…

  34. Tomsn says:

    Next Problem on other site: when i add Tinymce-comments AND live-preview-comments, the tinymce-comments work but the live-preview did stop working, after disable tinymce, the live-preview works as well …
    (hope u unsderstand this …) :-)

    i have WP2.2 with Notsofresh Theme
    and WP2.1.3 with gluedideas_subtle Theme

  35. mk says:

    Tomsn,

    Hello, if Tinymcebar means TinyMCEComments, most probably the theme is not using "comment" as the comment box name, but it is quite rare and maybe need a lot of modifications. I'll follow it after I've completed the fixed at hand.
    And, TinyMCEComments is not designed to work with live-preview comment plugin. My idea is if you already can view the result in the editor, why do you need another place to display the result?

  36. greg says:

    I also love the plugin, thanks so much.

    I noticed the same thing that a commenter above noticed… suddenly long-time comments are ending up caught by Akismet. It's not all my commenters, but it does seem strange that this problem started after installing this plugin.

    Thanks again!

  37. Hi … thanks for a nice plugin.

    I have a suggestion to a tiny improvement.
    On the option-page you could have a listbox showing the names on the js-files found in /wp-includes/js/tinymce/langs/ so the admin could select a language-pack for TinyMCE.

    The only thing that should be added to the comment-code is a "language : <filename without .js>" option to the tinymce javascript.

  38. Mike says:

    mk,  i have another issue with tMCEc (v0.25 & 0.30)
    when posting a rather large message with IE, it is not being posted. The message will not appear and is not held bij wordpress. Don't have this problem with firefox 1.5 &2

  39. mk says:

    Mike,
    What version of IE you are using? I have no problem using IE 7.

  40. mk says:

    Greg,

    I think I'll check the issue with the Akismet author. Thanks for notifying.

  41. mk says:

    Martin,

    I'll add more features to tune the TinyMCE in later versions. Stay tuned :)

  42. Mike says:

    mk, i can reproduce the problem with IE 6.0 (at my home and all my IE 6 users report the problem) don't have IE7, so can't test it…

  43. Patrice says:

    really great plug-in!!!

  44. I disabled this plugin for a short while to see if I still had Akismet issues. Without the plugin — no false positives. With the plugin — many false positives. Shame, it was a good idea, but it must remain disabled for now. My commenters were NOT including links in their comments.

  45. mk says:

    Hello guys,

    I've just wrote a support request to Akismet Blog. Now we have to see if they could provide solution/explanation for this.  Thanks all for your support :) .

  46. Laura says:

    Nice plugin but I am having one problem with it.  Everything looks fine on the blog but when the comments are mailed to me quotation marks appear as &quot; and apostrophes appear as '.  Any ideas why this is happening?

  47. mk says:

    Laura,
    Have you installed any plugins that also "interferes" the comments?

  48. Greg says:

    @mk – thanks for trying to dog it down, I hope you can figure out what the issue is, I really do like this plugin. I just posted something else that got some comments, one made it through Akismet, one didn't, and I can't see any difference in the content of the comments (no links, etc.).

  49. Scott Tribe says:

    HI Thomas:

    I saw this new plugin from yesterday that is related to yours, and thought you might be interested in looking at what he does and perhaps looking to implement it for the users in a future update for your plugin.

single