Formatting toolbar


I integrated almost all the code used in bbcode plugin, so it’s highly not recommended to use both, it will probably break your forum.

(Stephen) #88

How would they conflict? One outputs code into the editor, the other parses it, right?


I integrated the code in my plugin, I needed the create some bbcode (float for example), it was easier to add everything, and a have “all in one” plugin.

(Stephen) #90

So you’re saying that your plugin will clash with the official bbcode plugin?

If so, shouldn’t that be noted in the OP, and potentially on the topic for the official plugin?

If a plugin clashes with an official plugin, shouldn’t it be tagged as broken?


Good point, sam added a warning in the first post

(Jordan) #92

I just installed this formatting toolbar (my first plugin!) and created a video to help any other neophytes, like me, who would like to see a demonstration of how to install this or any other plugins!

(Régis Hanol) #93

FYI git pull has nothing to do with the installation of a plugin :wink:

It pulls the changes (if any) from to your local copy.

The nice thing, is that it’s not even needed as it is included when you do ./launcher rebuild app (:raised_hands: for less work)

(xiasummer) #94

is it possible to add this feature?


I think so, I personnaly use the gallery theme component from the same author without any issue.

(Logan) #96

Does anyone know how to add a horizontal rule? I have some members doing it with the <hr> tag, but others ask, “How can they do that!?”

I love the plugin.










You can create a button in the Customize section, in </head>

<script type="text/discourse-plugin" version="0.4">
    api.onToolbarCreate(toolbar => {
      I18n.translations.en.js.hrule_timestamp = "Horizontal rule";
        id: "hrule_button",
        group: "extras",
        icon: "level-down",
        title: "hrule_timestamp",
        perform: e => e.addText("<hr>")

When you click on the button, it will add a <hr>

The best way would be to create a github account, fork the plugin and edit it

Most of the action after that is in

:file_folder: assets/javascripts/discourse/initializers/ for the buttons
:file_folder: config/ for the language

(Logan) #100

Indeed, but I want something on the bar so the users who don’t know the secrets can easily do it.

(Logan) #101

That is beautiful. I can’t thank you enough. It’s up and running on all my themes.

(Kankuro) #102

I think you should just repurpose this plugin and call it a “Extended WYSIWYG Editor” or something along those lines.

It seems you added visuals for a lot that the other BBCode plugin adds, but they conflict with each other, which means people can’t use both unfortunately.

(Stephen) #103

No, absolutely not. It’s not a WYSIWYG in any sense of the term. Discourse has a Markdown editor with a preview pane.

A WYSIWYG editor previews the styles and formatting in-line - think Microsoft Word or the TinyMCE editor.

(Kankuro) #104

Essentially the same thing when using the preview. I’m sure he understands what I mean even if terminology are different between others.

(Stephen) #105

No, they aren’t, not even remotely close. This isn’t a point of debate, it’s the meaning of the term and it’s not something you can redefine at will.

(Kankuro) #106

Okay, well, my suggestion still stands.


I think WYSIWYG will be misleading, as Stephen said. My plugin is not that advanced

I don’t think there’s a bbcode that’s not in my plugin, I used the official as a base for mine at the time. I needed to add some bbcodes (float left and right, justify) myself for the plugin, so it’s easier to use all bbcodes in this plugin instead of asking users to install both.