A Flarum extension. Add custom BBcode buttons to the Composer toolbar. But, get creative. You may use it for other purposes as well! All it is doing is inserting text onclick. So again, although originally for BBCode, you can make a button insert any text/code.
This is great with the default editor paired with the preview extension.
Install with composer, and after activating, input and save settings.
composer require zerosonesfun/flarum-bbcode-button:"*"
composer update zerosonesfun/flarum-bbcode-button:"*"
php flarum migrate
php flarum cache:clear
Deactivate, tap the purge button (cleans up the database), then run this composer command:
composer remove zerosonesfun/flarum-bbcode-button
(notice how quick it is to add your favorite or complex custom BBCode)