Skip to:
Content
Pages
Categories
Search
Top
Bottom

Allowing HTML


  • larsjensen
    Member

    @larsjensen

    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?

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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


    larsjensen
    Member

    @larsjensen

    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

    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


    larsjensen
    Member

    @larsjensen

    I sure do, thanks a bunch! :-)

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.