Skip to content
Sign upLog in
← Back to Community
Not possible to paste highlighted code from Repl.it / Pay membership with paypal
Profile icon
hacker
has Hacker Plan
sebassilvap

Dear Community,
Just one month ago, one of the best features of Repl.it is now gone.
Before it was possible to copy and paste the highlighted and formatted code from Repl.it to for example Word or Powerpoint.
Now it is not possible to do it. The code is just text with the same color.
Is it possible to have this feature back?
Additionally in the past at the moment of pasting, the indentations dissapeared. Can this be also corrected?
Some people like me prepare some courses or presentations using this wonderful tool, and it would be nice if you let us use this feature I described.

Additionally, I would like please to request the people from Repl.it to abilitate the possibility to pay the membership with paypal.
I wanted to buy my membership a long time ago, but for this online suscriptions me and others I think prefer the paypal option.

Thank you for your help,
Best regards,
Sebastián.

Voters
Profile icon
sebassilvap
Comments
hotnewtop
Profile icon
SixBeeps

Hey there Sebastián,
Although there was no coloration of the tokens, I was able to paste the formatted code into Word just fine
image
Furthermore, it looks like my indentation also persisted (though for some reason, my tabbed code turned into spaces).
As for the PayPal thing, I'd highly suggest posting a ticket into the Feedback system if you haven't already. To be honest, I'd also like to see this feature as a PayPal user myself.

Profile icon
sebassilvap

@SixBeeps
Hi man, thanks for the Reply.
Yes I already posted that on the Feedback section as well.
Yes and that is exactly what happens now, in the past the Tokens were colored, exactly as you wrote them on Repl.it
That was really amazing and very helpful for People like me who want to create some Content for Courses and this stuff.
But well hopefully that can be solved.
Thanks once again for your Response!

Profile icon
DynamicSquid

Maybe try asking this on the feedback board: https://repl.it/feedback/

Profile icon
sebassilvap

@DynamicSquid
Thank you man!

Profile icon
DynamicSquid

@sebassilvap
yeah np!

Profile icon
Coder100

Hello, recently they have changed the syntax highlighting of the editor, and I think that is where the problem lies.

image

All the tokens are the same. Now this is what probably is causing the problem, but there's one more thing:

image

This glitch happens because they are doing dynamic highlighting. Before all the syntax highlighting was manually written:

<span class="keyword">function</span> <span class="identifier">hi</span>

but now it is dynamic highlighting, so it becomes:

<div class="magic"> function hi </div>
Profile icon
sebassilvap

@Coder100
Wonderful explanation! Thanks a lot!

Profile icon
Coder100

no problem!

@sebassilvap

Profile icon
ironblockhd

Replit didn't make the editor, they use vscode editor. They switched the editor a while ago so it could be related to that. You can try to use this tool: https://tohtml.com

Profile icon
sebassilvap

@ironblockhd
thank you! That is a nice solution! But hopefully we can have the option to do it on Repl.it once again without third parties. Thanks once again!

Profile icon
ironblockhd

@sebassilvap
i made a small script that makes it possible to copy it once again:

document.querySelector(".monaco-scrollable-element").querySelectorAll("*").forEach(function(elm){elm.style.color=getComputedStyle(elm).color});document.write(document.querySelector(".monaco-scrollable-element").innerHTML);document.body.contentEditable=true

simply go to the desired repl, run the script in your dev console and you will be able to copy it once again! :)

Screenshot_20200822_175148

Profile icon
sebassilvap

@ironblockhd
Thanks a lot! Wonderful answer!

Profile icon
CMMT20

@ironblockhd
That works fine!! Thanks for sharing!