javaterminal / tryjshell

Try JShell on Web
http://tryjshell.org
MIT License
91 stars 13 forks source link

Feature request: copy/paste of code snippet to/from tryjshell #2

Open liar666 opened 6 years ago

liar666 commented 6 years ago

Hi,

Thanks for the tool/website, it's very cool. Particularly for those using JDK8 and not having access to jshell :)

It would be even cooler if we could copy snippets of code to/from the web shell.

liar666 commented 6 years ago

Also, having a little higher timeout on tryjshell.org would make the site more usable for larger snippets of code, particularly when one cannot not copy/paste and has to re-type everything :{

rahmanusta commented 6 years ago

Hi @liar666, what do you mean about copy/paste snippets?

liar666 commented 6 years ago

What I mean: I'm working in my favorite Editor/IDE, then discover I have to test a small part of the code (e.g. I don't remember exactly how methodX or methodY is called on a particular object or I want to check if a for loop does not get out of bounds). What I would like it to be able to copy/paste a snippet of code from my Editor/IDE into the tryjshell.org website, so that I have only a few modifications to do to try it outside my own big&complex code.

rahmanusta commented 6 years ago

You should already be able to paste snippets to tryjshell.org

OrangeDog commented 3 years ago

You can copy/paste if you use the browser's menu e.g. Edit -> Copy.

However, the keyboard shortcuts Ctrl+C and Ctrl+V do not work, and instead type their control characters.

rahmanusta commented 3 years ago

Ctrl+insert (copy) and Shift+insert (paste) can be used for that https://github.com/xtermjs/xterm.js/issues/185