Support » Plugin: bbp style pack » Horizontal line in visual editor

  • Resolved Chuckie

    (@ajtruckle)


    I have set the option to include the TinyMCE visual editor. I know it can support more functionality. For example:

    Horizontal line
    Drop down list of font style – paragraph, heading etc.

    How do we add these extra buttons? I ask here because the editor is included via your plugin.

    Ta.

Viewing 15 replies - 16 through 30 (of 36 total)
  • Try it. If you can get it to work then show me please.

    I tested adding

    $args[‘teeny’] = false;

    But the reset function didn’t still work and really missing image tool.

    adding $args[‘teeny’] = false; was not a good solution.

    I must now delete unwanted options with CSS, for example:

    .mce-container.mce-menubar.mce-toolbar.mce-first{display:none;}

    It just would be nice, if everyonge could set the editor just what they want for their customers.

    Yeah. I am happy now as I have the image and my extra buttons. I know the one line I need to change in plugin until Robin maybe offers a compromise. It would make his tool even more powerful. 🙂

    Side note: can we use image links from outside domain in bbPress or must the image be on the forum domain?

    any image can be added.

    Anyway I failed to reset visual editor buttons even if I added a line to Robin’s plugin and I added

    function tinymce_editor_buttons($buttons) {…

    add_filter(“mce_buttons”, “tinymce_editor_buttons”, 99);

    I am sorry it is not working for you. It works for me at the moment.

    Plugin Author Robin W

    (@robin-w)

    Yes, that line is needed for this to work.
    Robin, can I kindly ask for you to add a checkbox to allow full buttons. If set you then set teeny to false. This was I won’t lose changes to your plugin and my button customisations will work.

    I am very busy at the moment on paid work, as I said if you give me exactly what changes you want, I will add them, but I don’t have time to read this long thread, and work out what the above means – sorry.

    Understood.

    functions.php

    Line 1862:

    //editor bbpress
    function bsp_enable_visual_editor( $args = array() ) {
    	global $bsp_style_settings_form ;
        $args['tinymce'] = true;
    	if ($bsp_style_settings_form['Show_editorsactivate'] == 1)  $args['quicktags'] = false;
    	return $args;
    }

    Provide a check option to allow the user to include the full default TinyMCE visual toolbar. If they say yes to the option, the above becomes:

    //editor bbpress
    function bsp_enable_visual_editor( $args = array() ) {
    	global $bsp_style_settings_form ;
        $args['tinymce'] = true;
    	$args['teeny'] = false;
    	if ($bsp_style_settings_form['Show_editorsactivate'] == 1)  $args['quicktags'] = false;
    	return $args;
    }

    That is all.

    Plugin Author Robin W

    (@robin-w)

    if you don’t enable the function in my plugin, you can just add this to your functions file or via code snippets

    add_filter( ‘bbp_after_get_the_content_parse_args’, ‘ajt_enable_visual_editor’ );

    //editor bbpress
    function ajt_enable_visual_editor( $args = array() ) {
    global $bsp_style_settings_form ;
    $args[‘tinymce’] = true;
    $args[‘teeny’] = false;
    if ($bsp_style_settings_form[‘Show_editorsactivate’] == 1) $args[‘quicktags’] = false;
    return $args;
    }

    Fantastic resolution as always. Neat.

    Works a charm. I inserted that code above my existing code for button customisation.

    Plugin Author Robin W

    (@robin-w)

    great

    I just added the function without removing existing function in ppb style pack + added CSS in order to disable unwanted items:

    #mceu_11-button,#mceu_12-button,#mceu_15,#mceu_16,#mceu_17-button,#mceu_18,#mceu_19-open,#mceu_24-open,#mceu_25-open,#mceu_26-open,#mceu_27-open,#mceu_29-open,#mceu_30-open,#mceu_31-open,#mceu_92,#mceu_93,#mceu_72,#mceu_73,#mceu_74,#mceu_75,#mceu_76,#mceu_77,#mceu_78 {display:none!important;}

    Images must now add using LISĂ„Ă„ (= ADD). Still missing CODE from visual editor, but preformatted makes quite the same.

    Endeed just putting the web-address of the image, bbPress automatic wraps the address with img tag. The image dialog box just adds some extra settings.

    Still it would be nice to add option to use set $args[‘teeny’] = false; with an option in the setting of bbp style pack. Some additional text maybe needed to explain, what might need to do.

    • This reply was modified 4 months, 4 weeks ago by tapiohuuhaa.

    Adding extra function doesn’t work. When I used paragraph dialog, the ADD dialog didn’t work. And when I used ADD dialog, the paragraph dialog stopped working.

    I must just add a line to the bbp style pack and use CSS in order to get almost the result, which I wanted.

    There seems to be much problems. The editor worked ok, when adding a new topic. But adding a new replay, the ADD dialog didn’t work.

    Because it doesn’t work in all circumstances, I must keep the default setting.

    • This reply was modified 4 months, 4 weeks ago by tapiohuuhaa.
    • This reply was modified 4 months, 4 weeks ago by tapiohuuhaa.

    I am not sure of your problems. You saw my previous code. And I provided a link to a StackOverflow answer which has more code for rebuilding the second toolbar line.

    I have not had to fiddle with any classes at all. I simply rebuild the first toolbar to have the buttons I wanted. I left the second as it was.

    Note that CODE will not display on the tool bar. I did research on it and CODE shows a popup window. It is not for adding code tags around text. As a result, it requires a plugin to be installed from the tiny library. It is not there by default. Without the plugin the code button won’t show.

    I don’t need that button. It is easy to wrap text with the code tag and you can use a hotkey too.

    I didn’t get working my own settings, but I get with CSS partial control.

    I can with CSS:

    1. Take off select boxes
    2. Take off from basic row unwanted items

    @media screen{
    #mceu_31-open,#mceu_30-open,#mceu_27-open,#mceu_26-open,#mceu_25-open,#mceu_24-open,#mceu_0,#mceu_11,#mceu_12-button,#mceu_15,#mceu_16,#mceu_17,#mceu_18,#mceu_19{display:none!important}}

    I must use #mceu_31-open instead of #mceu_31 because the latter caused that all menus disappeared.

    But I can’t take off from select-menus individual items, because the id values for them varies and they don’t have classes.

    I left LISÄÄ (ADD) and OMA TYYLI (OWN STYLE). They have all necessary items + many unwanted items. Especially LISÄÄ has unwanted items like Lue lisää (Read more) and Sivunvaihto (Page break).

    Anyway it is relative easy to select all necessary styles, including CODE.

    https://www.sanaristikkofoorumi.net/test/wp-content/uploads/editor-dark-theme.png

    The same CSS didn’t work in test site. Id values are different.

Viewing 15 replies - 16 through 30 (of 36 total)
  • You must be logged in to reply to this topic.