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,
https://www.google.com/search?&q=discourse+copy+code+button
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
```
already
Thanks, I meant update as in, a comment on the issue.
I believe that @fjenett and @REAS are the only ones able to install plugins on this site. They would need to comment.
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.
GRRR
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?