Ah - I did misunderstand. I used to use a firefox extension called 'terminalrun' (now defunct) that would automatically hightlight linux commands in all pages and you could run them by clicking on them (not very secure!)
On Saturday, August 29, 2015 at 6:34:05 PM UTC+1, Rustem wrote: > > BJ, > > I think you misunderstood. I was describing a way to copy a fragment of > code from a wiki to clipboard, for when you actually need to reuse it. The > entire contents of a <code>...</code> tag, without having to drag your > mouse across it to highlight everything. (If you want only a part of it, > you'd still have to do the usual highlight+copy way.) > > Rather than having a multitude of small scripts, I keep them in my wiki, > commented and tagged, and just copy and paste them into command line when I > need to run them. I guess it's a somewhat specific use case, not everyone > will find this useful enough to bother. > > --R > > On Saturday, August 29, 2015 at 4:01:57 AM UTC-7, BJ wrote: >> >> HI Rustem, >> it is also possible to use tiddlyclip to copy hightlighted chuck of a web >> page as html and have them appear in a tiddler, just replace @text with >> @web in the snip rule:- >> >> http://tiddlyclip.tiddlyspot.com#defaultSnip >> >> cheers >> BJ >> >> >> On Saturday, August 29, 2015 at 3:11:33 AM UTC+1, Rustem wrote: >>> >>> I keep a TiddlyWiki for documenting bits of code, scripts etc. In TWC, I >>> had a homegrown plugin that added a “Copy All to Clipboard” button to every >>> code block. (Eventually, it degraded to “Select All”, when manipulating the >>> clipboard from a web page became impossible, with tightened security in a >>> newer version of Firefox.) >>> >>> I was missing that functionality in TW5, but didn’t want to rewrite the >>> plugin since I would not be able to make it copy to clipboard anyways. >>> Finally, it occured to me that there might be a browser add-on that could >>> do the same. All that is required is copy inner HTML from an element on a >>> right click. It wasn’t easy to find, but there it is: >>> https://addons.mozilla.org/en-US/firefox/addon/texttotag/ >>> >>> After installing it, right click on your piece of code, select >>> “TextToTag” from the menu and voila - the code is in your clipboard. >>> >>> When clicking, make sure you are pointing to the text, and not to the >>> whitespace between the lines or on the right-hand side in a block of code. >>> And if you find that limitation inconvenient, you can click anywhere within >>> the block of code if you add this to your stylesheet: >>> >>> pre code, pre.hljs code { display: table; } >>> >>> Enjoy! >>> >>> —R >>> >>> >> -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/3229e7b6-d876-4ca9-9838-fa64dc7fa595%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

