Add composer buttons for tags added by BBCode plugin(s)

Is there any chance to see the wyswyg button interfaces added for the tags provided by this plugin, where they are not already covered by markdown?

What I mean, the B for bold is fine in using the markdown but there isn’t a markdown for [img][/img] for example and this plugin add support for it but don’t offer a button.

The markdown for an image looks like this:

![Screenshot from 2024-04-01 09-55-37|690x217](upload://oFgNwMN6.png)

And gets inserted if you use the upload/image button in the composer.

1 Like

The markdown for the bbcode [img][/img] is not the same.

It allows to embed an image hosted elsewhere, even when the usual discourse native preview fails.

In any case, it was just an example. I don’t understand why sometimes I have to see this kind of replies that feel passive aggressive without reason to be.

1 Like

Sorry. Maybe I don’t understand your problem. I’ve only used the bbcode plugin to deal with imports that need to support bbcode on imported posts.

You can use the markdown image for external images, so I suspect that it’s not likely that the plugin will get the feature your desire

It should be possible to add the wysiwyg button in a theme component.

As I mentioned, there are features that the markdown already covers, and it should remains like that. It’s absolutely fine that discourse has a “preferred” formatting language and markdown is absolutely fine (I am coming from a developer background, I lost count of the amount of readme.md that I’ve wrote :stuck_out_tongue: )

But most users coming from other forum software, migrating or being introduced to discourse, will find some features missing.

Namely:

  • [u][/u] to underline
  • [center][right][left] to align text
  • [size] to change the of text
  • [font] to change the font face
  • [color=COLOR] to set the colour of text
  • [bgcolor=COLOR] to set the background colour of text
  • [highlight] to highlight text
  • [small] to make text… small
  • [aname=NAME] to create an anchor in a document with a name
  • [jumpto=NAME] to create a link to an anchor
  • [img] create an <img src='something-something.com/image.jpg'> html tag, which is not the same as the upload of an image locally. Lots of self hosted don’t allow the uploading because of disk space concerns. This is another topic I would like to expand upon but it’s not the place here

I can agree that they might be limited use tags, but the fact that there isn’t a visual aid (button or autocomplete when someone type a [) it’s a straight worse user experience for communities and users coming from other major community software, legacy and modern.

I am aware of a plugin (or component, can’t recall) that provided that auto-complete feature but it’s marked broken since quite some time now unfortunately.

2 Likes

I’m such a curmudgeon that I’m quite glad people can’t make posts with underlined, big, or colored text. :person_shrugging:

I think you can insert anchor links, however. and I still don’t think there’s a reason for [img]. here is an off-site image

![here is an off-site image](upload://7Jv6B5bOOwMd4Czf2EDUwsrCihc.jpeg)

But, that’s not helpful, since it doesn’t answer your question. In hopes that I might be a little bit helpful, maybe MD Composer extras could work for you.

The color one does work… or at least “[color=darkred]Spice[/color]” works in our instance of discourse. I can’t get it to do it here (so maybe admin only or some weird thing?), and can’t figure out how to do other things listed above, or things that corrupted when it moved things over from HTML, like small caps… but some things do seem to be possible beyond just what is listed. :slight_smile:

Hello and welcome @Zanbabe :slight_smile:

I may have accidentally scooped your post up and split it off with these others into this request to add composer buttons for the different tags.

Just to double-check, was your message connected to that, or about a separate issue of how to use the code tags themselves?

FWIW, I think the Formatting toolbar (the plugin version of the theme component pfaffman linked above) has a lot of these in.

2 Likes

We were just discussing what we could and couldn’t do with the Discourse flavor of BBCode, I believe, but I came in late so…? Personally, I was just hoping to be able to do some things that we used to be able to do before our site got converted. Lots of my HTML was mangled.

1 Like

No worries. :slight_smile: The plugin topics can be a mixed bag of issues/conversation and I sometimes split and merge in the wrong place, so thought I’d better double-check.

We don’t have this plugin on meta so the extra tags won’t work on here. Though if you let me know which ones you’re having trouble with I can give it a run-through on my test site and see if there are any issues?

Not having “trouble” with anything that I know is built in… just problems with my posts that were built in HTML that got their HTML tags wiped when they came over because Discourse doesn’t seem to have anything comparable… like things written with small caps for instance. For the tags that were wiped just because it is done in a different way, I found out how to do color and how to kind of replicate columns using a table.

None of this was about me trying to resolve a problem. I was just commenting to help… didn’t realize you had a BBCode with color and one without.