Pastebin Embeds

Users who are viewing this thread

Janus

*spicy* *camper*
Administrator
Thanks to Ra'Jiska's request and his contribution of some of the base code and a bit more work on my part, you can now embed Pastebin pastes into your posts. This can be used for better code styling than SMF's built-in [code] blocks.

Note that if you do an inline edit of a post, any Pastebin embed in that post will not show up until you refresh the page. They will also show up a bit differently when you preview a post than how it will look normally, which may or may not be noticeable (more-so on darker themes). Also note that they will be a little brighter than maybe desired in general on dark themes, but they should still look OK there. I didn't feel like completely restyling it for dark themes, so the background of the Pastebin embed is just made partially transparent to blend the otherwise bright white background with the theme's background.

There is a button added for it as well with this icon:
pastebin.gif


Here are a couple of quick examples. Basic PHP:
https://pastebin.com/swmUkbCc
Code:
[URL]https://pastebin.com/swmUkbCc[/URL]

And a smaller one-line example, using just the Paste ID:
An0UUACd
Code:
[URL]An0UUACd[/URL]
 
Back
Top Bottom