bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

Allowing HTML

(5 posts)
  • Started 1 year ago by larsjensen
  • Latest reply from larsjensen
  • This topic is not resolved

Tags:

  1. Hi there

    First of all, thank you for a nice and easy forum system.

    I've integrated TinyMCE with my bbPress installation, but TinyMCE inserts some HTML, which bbPress doesn't support.

    Is there a way to allow more HTML tags in bbpress?

    Posted 1 year ago #
  2. The allowed tags are in template-formatting.php I believe (might be wrong as it is early there) in your bb-includes, but it is best to look even at the 'allowed markeup' on this forum when you are posting and then know those can be used. To add more, it is often done with plugins, like the image plugin in the 'extend' tab of this site. Or I through this up to use stike for myself:

    <?php
    function allow_strike_as_allowed_tags( $tags ) {
    $tags['del'] = array();
    return $tags;
    }
    add_filter( 'bb_allowed_tags', 'allow_strike_as_allowed_tags' );
    ?>

    There are was to add to the bb_allowed_tags even with plugins.

    Trent

    Posted 1 year ago #
  3. Thank you very much, I think I'll have a go at creating some plugins to enable more HTML tags.

    If I for instance wanted to add italic text, should I then write "allow_italic_as_allowed_tags" or "allow_i_as_allowed_tags"?

    // Lars

    Posted 1 year ago #
  4. Well, the code "em" is already for italics, but if you really need to have it as the "i", it would be something like this (chrishajer is going to hate me for saying this as it is really poor markup, but....)

    <?php
    function allow_italics_as_allowed_tags( $tags ) {
    $tags['i'] = array();
    return $tags;
    }
    add_filter( 'bb_allowed_tags', 'allow_italics_as_allowed_tags' );
    ?>

    That should work. Get the idea?

    Trent

    Posted 1 year ago #
  5. I sure do, thanks a bunch! :-)

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.