The main purpose of including code on a forum post is so other people can use it, to either help find problems or just use it in their own projects. Placing the cursor before the last character, scrolling to the bottom of condensed code blocks, and shift clicking after the last character to select all of the code isn’t that tedious, but other major sites like Github, Pastebin, etc all have a copy all / select all / view raw in its own tab options for good reason. It’d be wonderful for code tags, whose existence is based upon giving people the code within them, to provide that with the single click of a button. It would also be useful for users who didn’t know they can shift click to select text. Sometimes I find even myself forgetting to shift click to select all of the text and end up click dragging to select.
A good idea for “code” forums.
But I don’t know if the ratio of Discourse forums that might be considered “code” forums is high enough to have it in the Core.
Maybe better as a plugin?
I’m not sure. Initially, yeah – you’re right. It definitely sounds more suitable for a plugin. But even if not all Discourse forums are code forums, the code tags are part of Discourse’s core. Code tags aren’t a plugin, so I don’t think an upgrade to them should be a plugin.
This is a dupe req, I will dig out the other in a bit.