Skip to:
Content
Pages
Categories
Search
Top
Bottom

Add/Remove from TinyMCE


  • tkse
    Participant

    @tkse

    Is it possible to get some more information into what I should to do add features to TinyMCE or even TinyMCE Advanced in bbPress?

    I’ve looked into the Enable Visual Editor guide, and currently I’ve only got that enabled for users. I like it that way. However, I’d also like to display the “Paragraph”, “Heading” etc. feature. And even when I installed TinyMCE Advanced, nothing changed within bbPress.

    Optimally, I will be able to display only “Paragraph”, “Heading 3” and below, for better SEO.

    Edit: This is what I have currently:
    visual editor

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

  • Robkk
    Moderator

    @robkk

    In the guide it does say this.

    —-

    Use this function below instead with new argument added to be able to add new media like the emoticon button.

    function bbp_enable_visual_editor( $args = array() ) {
        $args['tinymce'] = true;
        $args['teeny'] = false;
        return $args;
    }
    add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );

    Please note that if you disable the teeny mode in the visual editor and allow other media buttons through the TinyMCE Advanced plugin, you will probably need to add on to this function and put it into your child theme functions.php file to allow your users to use some of the buttons like the table button.


    tkse
    Participant

    @tkse

    I don’t know the arguments for the different buttons though?


    Robkk
    Moderator

    @robkk

    You did add this argument right?? Having this at false shows the full editor. Some button may be not usuable for the forums though, so you need to move them around in the TinyMCE advanced plugin settings.

    $args['teeny'] = false;


    tkse
    Participant

    @tkse

    Wow, I’m sorry. I didn’t realize I had forgotten this line.

    I noticed the second line I had in my code was to disable the HTML editor, not teeny. However, is it possible to display the HTML editor only for moderators and above?


    deyvinchi
    Participant

    @deyvinchi

    i us plugin “bbPress Enable TinyMCE Visual Tab” 😀


    Chuckie
    Participant

    @ajtruckle

    I tried the code above and I get all the buttons.

    But it is missing the Insert Image button.


    Chuckie
    Participant

    @ajtruckle

    After using the code tweak ($args['teeny'] = false;) I was then able to use this snippet:

    add_filter("mce_buttons", "tinymce_editor_buttons", 99); //targets the first line
    ​
    function tinymce_editor_buttons($buttons) {
    return array(
      "formatselect", 
      "bold",
      "italic",
      "underline",
      "bullist",
      "numlist",
      "blockquote",
      "justifyleft",
      "justifycenter",
      "justifyright",
      "code",
      "link",
      "unlink",
      "image",
      "wp_adv"
      //add more here...
      );
    }
Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar