Skip to:
Content
Pages
Categories
Search
Top
Bottom

Alignment text coming with HTML tags


  • itspriyanka
    Participant

    @itspriyanka

    I am using bbpress for my website which is in development phase right now. One of my forum topics can be accessed here: https://drf.learnwise.in/forums/topic/retinitis-pigmentosa/. I am using visual editor by adding this code in my functions.php:

    function bbp_enable_visual_editor( $args = array() ) {
    $args[‘tinymce’] = true;
    return $args;
    }
    add_filter( ‘bbp_after_get_the_content_parse_args’, ‘bbp_enable_visual_editor’ );

    All the formatting options except alignment are working fine. For alignment, it show the HTML tags as well after posting; as you can see in the forum.

    Can someone let me know how to solve this?
    Thanks,
    Priyanka

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    Enabling TinyMCE is just one step, bbPress uses filters to limit the set of tags and attributes allowed, and for participants, it can be very limiting. In this case, bbPress doesn’t allow the ‘style’ attribute in HTML. A lot of things TinyMCE does require various HTML tags support and support for ‘class’ and ‘style’ attributes.

    I have support for this in my GD bbPress Toolbox Pro plugin. Or, if you prefer coding the solution, check out ‘bbp_kses_allowed_tags’ filter for bbPress allowing you to pass modified list of HTML tags and attributes to use instead.

    Regards,
    Milan


    itspriyanka
    Participant

    @itspriyanka

    Hey Milan,

    Thanks a ton! Your blog https://bbhelp.club/answer/editing/how-can-i-expand-allowed-html-tags-and-attributes/220/ helped me fix the issue 🙂

    Appreciate your prompt response.
    Regards,
    Priyanka

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar