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 - 1 through 15 (of 36 total)
  • Plugin Author Robin W

    (@robin-w)

    you add them just as you do for WordPress – you’ll need to find out how to add any you are after in WordPress eg

    https://scanwp.net/blog/add-a-button-to-the-tinymce-editor-in-wordpress/

    But this works according to my experience just for backend.

    Plugin Author Robin W

    (@robin-w)

    @tapiohuuhaa – what code did you use ?

    I have just used the backend settings for tinyMCE. There was not frontend settings. Or I have missed something. Must I use special setting for frontend using PHP scripts?

    I look forward to any clarification on this before I jump in. I need this on the front end.

    I do have a “snippets” plugin that lets me run certain snippets in the front end, back end or both. So maybe I can add a snippet for this?

    Maybe this must be done disabling editor settings in ppb style pack and define tools with PHP script.

    I get once script to set it, but just with few options. Full set and minimized. Apparentlyt there could be some mixture.

    Plugin Author Robin W

    (@robin-w)

    sorry beyond free help

    Chuckie

    (@ajtruckle)

    I resolved it by adding a new 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",
      "alignleft",
      "aligncenter",
      "alignright",
      "link",
      "unlink",
      "image",
      "wp_adv"
      //add more here...
      );
    }
    
    tapiohuuhaa

    (@tapiohuuhaa)

    I put that in one snippet – no effect.

    Chuckie

    (@ajtruckle)

    Works for me. I have a toggle button on the right now that shows the second toolbar with all the other buttons.

    See:

    https://www.dropbox.com/s/4m4idct1ljh8nbc/horz-line.png?dl=0

    I had to clear the browser cache. Tested on mobile etc.

    tapiohuuhaa

    (@tapiohuuhaa)

    , 99” apparently means priority and that setting should be read last.

    I would like to add some items too, for example indent, remove indent, code.

    But I didn’t get any changes even if I cleared browser cache.

    Remove link is IMO unnecessary, because it is in the link tool.

    Chuckie

    (@ajtruckle)

    I have outdent etc in there.

    As a minimum if you opened the bbp style pack function file and locate:

    $args['tinymce'] = true;

    If you add this line after it:

    $args['teeny'] = false;

    This will change it to a full toolbar. But then you loose Insert Image button. This is why I used the other code.

    It might be that this extra line is required in the function php too. I can’t quite recall.

    Chuckie

    (@ajtruckle)

    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.

    • This reply was modified 7 months ago by Chuckie.
    tapiohuuhaa

    (@tapiohuuhaa)

    Because bbp style pack has much updates, I would not like to change anything in that plugin but just use Code Snippet to make my own settings and extra code.

    tapiohuuhaa

    (@tapiohuuhaa)

    What ajtrucke proposed, is reasonable. The it would be possible to redefine button sets with PHP scripts by using Code Snippet. Then also my setting would work.

Viewing 15 replies - 1 through 15 (of 36 total)
  • The topic ‘Horizontal line in visual editor’ is closed to new replies.