Skip to:
Content
Pages
Categories
Search
Top
Bottom

TinyMCE for topics and replies


  • billysgtr
    Participant

    @billysgtr

    I have enabled the Visual Editor for topics and replies using the following:

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

    The problem is that only administrator can add text-colors font-styes and other things like that.

    I am getting html format when a subscriber uses colors and font-styles
    <span style=”color: #00ff00;”><span style=”font-family: ‘book antiqua’, palatino, serif;”>wfwffwwf</span></span>

    WP Version 4.9.8
    bbPress Version 2.5.14

    I would really appreciate any help,
    Thanks!

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

  • billysgtr
    Participant

    @billysgtr

    The main problem is with text colors. Subscribers can add colors but when they are submitting their reply, html showing up instead of the color.


    billysgtr
    Participant

    @billysgtr

    I am replying my own post in case anyone has the same problem.
    I solved my problem using the following script https://gist.github.com/ntwb/7797990
    and I added style attribute for the html elements I need. Now everything works fine.

            // Span
            'span'             => array(
                'class'     => true,
                'style'     => true,
            ),

    Robin W
    Moderator

    @robin-w

    @billysgtr – sorry I didn’t get to this one, only so many hours and weekend commitments, but thank you for posting the answer – many don’t bother, and this will help others !


    billysgtr
    Participant

    @billysgtr

    Hi there,

    Totally understand 🙂

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