openexchangerates / javascript-sandbox-console

a mini interactive javascript console for library/plugin demos and homepages
http://openexchangerates.github.io/javascript-sandbox-console/
MIT License
319 stars 58 forks source link

Add support for :history command #7

Open pdeschen opened 12 years ago

pdeschen commented 12 years ago

Hello,

I would be nice to have the ability to display the actual history content so that one could save the buffer into clipboard. The user case if the following: once you have type in a long series of javascript code, you might be interested in keeping a copy of these hard working bits :-)

I have currently a fix proposal for this one but I'd like to add the ability for this command to not only display the actual history but also add it directly to the clipboard (which seems harder then I first thought!) I'll send a pull request for this one shortly.

Also, what do you think about the idea of having a command registry so that users could add there own commands to the sandbox? Something along the following line:

:register <name> <help> <callback>