Hi any chance we could get a button that simply says copy code at the bottom of a code snippet, rather than having to click and drag, I know some of you might not find it a big deal, but it can be a hassle pulling long pieces of code using this method. Anyway just a suggestion.
This would be great, saves some time and possible copy errors. I noticed the old forum had it; is there by chance a specific reason it wasn’t implemented in the current one?
Any update on this would be appreciated, its clear Im not the only one who could benefit from this.
a real update could only come from the admin of this forum
yes, you are not the first who noted that.
yes, as it is not ready from the discourse side,
looks like there are only hacks, what still not work on all browsers
and also might have more problems like memory leaks…
also i got the impression some so called “co founders” there at “discourse”
are not that willing…?
all that might be good reasons to sit it out?
but “we” also would take the risk to experiment?
also the first step was addressed many times,
how to get the beginner to put the code into the
</> Preformatted text button
by better icon, better tool-tip text , or just a starting template what has
info section and a code section
type or paste code here
Thanks, I meant update as in, a comment on the issue.
Really annoying is copying code on a tablet. For that reason I already started to provide a link to a file on my drive below the posted code. At least until this will be solved.
what is the tablet problem?
from a very old tablet phone?
copy paste? possibly,
but the `
are missing on my phone keyboard, so can not type them manually.
Another thing is; when I copy the code (on my tablet) from the forum into my app, I can’t paste it directly. I first have to paste it into for instance a “github edit box”, or what I mostly do, into an text editing app like “QuickEdit”, than copy it again into my app. Otherwise, if I paste it directly, it will be pasted as a single line, with all the format problems. Pasting into an intermediate edit box will somehow “clean” the text. Also the " character I have to delete and re-type, because it somehow gives an error.
Does it also happen when you copy/paste code from another website into your app, or is it only code from this forum?
Some will others not. I do not know the format used on the web sites.
Have you tried to (if it’s possible with your tablet) copy with
control shift c and paste with
control shift v? Believe that’s a way to maintain meta information while copying, although I’m not sure it works for various OS and devices.
Yes my tablet keyboard has that option and that’s the way I do it.
For those also struggling with copying on phone or tablet; I found a fantastic app on Google’s Play store called “Cópia Universal”. I checked it, and it is safe.
You just scroll down the notification screen, choose the activation bar, then long tap the code box and a new screen appears with solely the code with a button to copy. I can directly paste it into the APDE and the text appears formatted, instead of everything on one line.
Just to add another voice saying this is really annoying. A copy button would be good, or ‘open in separate window’.
Hi @RichardDL – you are in luck!
It looks like Discourse published a full copy-code-block button feature just 9 days ago.
It is now enabled, and live on this forum for all code blocks (past, present, and future).
// this is a standard code block, it can be copied. println("copy with the copy code block button");
Test, working, thanks.
Perfect. It works on my PC and my phone. But it is a pity that it doesn’t work on my tablet (Kitkat 4.4 Chrome actualized). And there I need it most.
Now this I like!!!
Hi Noel – consider reporting that on the main Discourse forum I linked where it was developed – maybe they can fix it?