New BuddyPress plugin: BP-TinyMCE

I threw a little something together today to add WYSIWYG editing to BuddyPress, using TinyMCE. I want to be careful about the tags I allow, so I’m whitelisting, which is a bit tedious. As a result, there are only a few buttons available: a, em, strong, ul, ol, li. It’s a start, though.

Seems to work everywhere in BP: forums, wire, messages, profile pages.

A note about TinyMCE: WP ships with TinyMCE, and I thought it made sense to use that version instead of attaching one to this plugin. I think that the path to TinyMCE (line 18 of the plugin) should work on all installations, but you may have to tinker if you don’t see it popping up in the head of your BP pages. Moreover, the language files for WP’s version of TinyMCE are misnamed, which means that they don’t work right out of the box (at least for me they don’t). You may need to change the name of wp-includes/js/tinymce/langs/wp-langs-en.php to en.php in order to get the hover and help text in the TinyMCE box to work.

Download the plugin here. Don’t use in a production environment unless you are very certain that you are satisfied with the security of this plugin!

8 thoughts on “New BuddyPress plugin: BP-TinyMCE”

  1. Boone –This is extremely cool. Can’t wait to use it. For some reason when I activate it on the current 1.2 version of BuddyPress, I keep getting a “Please enter some content to post” when I try to post with TinyMCE activated. Any ideas what’s causing that?

  2. Hi Ted,

    Thanks for having a look at how it works with 1.2 – I hadn’t even bothered before releasing. I tried it this afternoon and realized that you are quite right. The behavior I experienced was that anything posted with the “what’s new” box at the top of a group home page would give the “Please enter some content” message, while posts elsewhere on the site (forums, etc) were working fine. The problem boils down to the fact that those “what’s new” messages are posted via AJAX rather than through a normal form submission.

    I think I have fixed the problem. Have a look at version 0.2 of the plugin (through the WP plugin auto-updater, or at the WP repo) and see if it’s working for you.

    Please note that I turned off the rich editor for replies to activity items. There was a funny nesting issue happening and I thought it was easier to just turn the thing off for the time being.

  3. Hi!
    I’m using WPMu, BP 1.2.1 and Bp-TinyMCE 0.2.1, but the problem with “what’s new” box is still here!.. can I suggest to deactivate this part of the plugin until the problem is resolved?

  4. Very nice Plugin exactly what I needed. I also managed to use avanced plugins for tinyMCE and it works great.

    Only one thing I just can’t manage to get done is with the buddypress group forums. It seems like their only BBcode compatible if anyone finds a way to use TinyMCE in forums it would awsome. For resizing images on the fly for exemple

  5. Hey awesome plugin. On my BP-1.2.5 installation I have resolved the “Please enter some content to post” thing by editing bp-tinymce-js.js and making the following change:

    j("input#whats-new-submit").unbind( 'click' );

    j("input#whats-new-submit").click( function() {


    j("input#aw-whats-new-submit").unbind( 'click' );

    j("input#aw-whats-new-submit").click( function() {

    Hope this helps someone! 🙂

    (it’s now posting with the wrong timestamp, but still tinkering)

  6. My apologies for double posting, but I forgot, I had to also make another change.
    'group': j("#whats-new-post-in").val()
    'item_id': j("#whats-new-post-in").val(),
    'object': 'groups'

  7. Hi Boone,
    Is there a way to use BP-TinyMCE with recent version of Buddypress(e.g. 1.6.1) ?
    If so, could you please told me how to modify the code to do so?

Leave a Reply

Your email address will not be published. Required fields are marked *

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image