14 days later

fakruzaruret

Flarum already supports this. It is part of the standard/core bbcode extension.

Code:
[IMG src=http://clipart-library.com/images/Lcdooan6i.png height=50 width=50]

You can even add a title and alt:
[IMG src=http://clipart-library.com/images/Lcdooan6i.png title=An apple alt=An apple height=50 width=50]

    Version 2.9.1 Released!

    Michelangelo

    Nothing amazing has been added and I almost didn't even bother announcing this. But, just so you know... the [audio] bbcode now properly supports m4a audio as well as the already existing mp3 and ogg types.

    While I'm on the topic of audio, for anyone who still doesn't know, you don't have to use this bbbbcode extension if all you really want is the audio support. You can instead use this or this. 🎶 🎵 🎹

    Version 2.9.5 Released!

    Michelangelo TMNT 🍕 🐢

    A couple more small tweaks have been made to the audio bbcode. Now you may use any of the following audio types: mp3, ogg, m4a, wav, flac, or webm. Also, optionally, you may add "width={a number}" as an attribute to the audio bbcode to change the player's width. But, if you don't feel like typing in a width, that's fine, the player will be 100% width by default. Examples are below. Each attribute is optional; although you obviously need at least one audio file.

    [audio mp3="song.mp3" ogg="song.ogg" width="50"]
    (50% width player which will use either the mp3 or the ogg file depending on the browser.)

    [audio mp3="song.mp3"]
    (100% width mp3 audio player.)

    excellent work. did you check if you can add the spoiler tag to the editor bar? (:

      phloo I haven't studied how to do that yet. To be honest, I think it's something which would take me many, many hours and so I'm kind of avoiding it. 😅 Just because of the way Flarum code is, and I'm not a highly skilled coder (I just play around with code from time to time; and mainly only WordPress, and now some Flarum code).

      I'm assuming I could take Flarum's core editor code and see how it is adding the buttons to the editor and then see if I can figure it out from there. It's exhausting me just thinking about it though. I don't think I'll attempt this anytime soon.

      But, a reminder for any skilled developer who may stumble upon this post. Pull requests are welcome. 😀

      Ah, I understand. Assumed you were already adding buttons to the editor bar - and it wouldnt be much of a hustle to add another tag option. But seems to be different.

      Thanks for the reply. Hopefully someone else may help. The spoiler tag is very important imho.

      is possible to add keyboard tags?

      kbd {
          display: inline-block;
          margin: 0 .1em;
          padding: .1em .6em;
          font-family: Arial,"Helvetica Neue",Helvetica,sans-serif;
          font-size: 11px;
          line-height: 1.4;
          color: #242729;
          text-shadow: 0 1px 0 #FFF;
          background-color: #e1e3e5;
          border: 1px solid #adb3b9;
          border-radius: 3px;
          box-shadow: 0 1px 0 rgba(12,13,14,0.2), 0 0 0 2px #FFF inset;
          white-space: nowrap;
      }

        alldataback Thank you for the suggestion and the CSS to go along with it.

        Version 2.9.6 Released!

        • Added kbd tag. AKA HTML Keyboard tag. It is meant to tell the user that they need to type something with their keyboard.

        Example:

        Please type [kbd]Y[/kbd] for yes.

        This converts to the standard kbd HTML tag and so viewing the source you would see:

        Please type <kbd>Y</kbd> for yes.

        By default the HTML kbd tag is typically courier type font and that's it. Similar to the way the code tag makes text look. But, many add CSS to make it look like a keyboard button which is what was done here.

          16 days later

          010101 thank you for this great extension! One question. Is it possible to change default "read more" text in spoiler? I can't find anything.

            hrvoje_hr

            [spoiler="Text you click on"]What you will see after clicking.[/spoiler]

            The above is an example. Instead of read more you would see “text you click on” if you tried this exact example.

              010101 I know that, but I would like to change the default "read more" message if the title is not included.

                18 days later

                Johnshi That’s not a valid audio URL. It would need to end in .mp3, .wav, etc.