Pastebin uses Geshi, there is an extension in dev for Pastebin (I authored many years ago as well, now it is under another developer) and a bbcode https://www.phpbb.com/customise/db/bbco ... bin_embed/
but you need to pastebin your code first.
I am not aware of a Code BBcode box replacement which uses Geshi ATm.
That would be interesting, I will see what I can do once I got some sparetime.
I need it as well, that's why.