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


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');

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

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.


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 thoughts on “MCEComments

  1. Thanks for the plugin, our users love it!

    But, I think TinyMCE comments plugin interferes with WordPress’s spam recognition mechanism. Because, after installing this plugin, we faced many problems and we had to remove wordpress’s spamming mechanism completely to keep the plugin running!

    I believe this is happening because this plugin maybe messing around with nonce generated by WP.

    If you know how to fix this, please let us know. Otherwise, we will debug it when we have some free time and let you know.

    Thanks again for a nice plugin :)

  2. boiledbeans,
    I would be gratful if you could shed some light on this issue. Many encounter the glitch as well when they are using Akismet.
    Thank you for your support :)

  3. Thanks very much for your great plugin.

    One litte problem. My blog is running with charset utf-8. Posts made as admin with TinyMCE are stored in the database also with charset utf-8.

    The comments written with TinyMCE when your plugin is running are stored in the database in HTML code. Is it possible to tell your plugin to store comments in utf-8 as well.

    Thanks a lot.

  4. theddy,
    1. If you are using pure Latin language, UTF-8 encoding = ASCII. That’s nothing to do with HTML.
    2. If you see HTML codes in comments, most probably your visitors are typing the code directly in the window, and TinyMCE helps replacing those into what we call HTML entities, for example < will become &lt; .
    3. If you wish your visitors to type in HTML code directly, I suggest tick the "Allow visitors to view HTML source of their comment" checkbox in the admin panel.

    Hope this helps. :)

  5. @mk
    I am not using "pure  latin code" – the blog is in German and the charset is set to utf-8 – so there are Umlauts, eg. äöü.

    If I edit a new post as admin with TinyMCE I see in the datebase that text is stored in utf-8 code.

    If TinyMCE Comments is disabled and a reader edits a comment with this simple editor the comment is stored with utf-8 code in the database as well.

    But if I enable TinyMCEComments the text is stored as HTML-code in the database. A German ä is stored as & u u m l ;  (I used spaces that you see the code).

    My question now: Is it possible that TinyMCEComments stores the edited text in the database as utf-8 as well.


  6. theddy,
    I see, you are complaining non-latin characters turning into HTML entities.
    You could add a option to the initialization parameters of TinyMCE by editing the plugin, where inside you could find tinyMCE.init, followed by brackets.
    Add the following inside the brackets:
    entity_encoding : "raw"

    See if that works.

  7. Hi,
    i would like to use this great plugin on my blog, but i don’t know how to choose the buttons i want to appear in the editor. I would like the ‘ul’ ‘ol’ ‘li’ stuff to appear, as the ‘blockquote’ stuff. Can someone help me to do that ?

  8. LOmiG,
    You could take a look at here, see the names for the buttons you want, and add the corresponding IDs into the button fields in TinyMCEComments panel. If the buttons are not available, probably you’ll need to create a plugin (Or get TinyMCE Advance) for that.

  9. Hey Gang,

    An apparent conflict between TinyMCEComments and the Lightbox 2 Plugin causes TinyMCEC to fail in Firefox.

    Any help to resolve would be appreciated. – Thanks!

    (Firefox / Vista 32 Bit)

  10. aeric,
    No, if you have read the comments above, you’ll know it doesn’t; It was filtered out by WP by default, as it may raise security issues.

    And, to all,
    I will disallow comments for this page from now on. I’m annoyed by E-Mail alerts because there are so many testing posts. To report a bug, or suggest an enhancement, please use the WordPress plugin repository.

Comments are closed.