Hi Tony,

On Sunday, June 28, 2020 at 9:20:13 PM UTC-7, TW Tones wrote:
> I have being trying to replicate your buttons to take snapshots of other 
> tiddlers as html, wikitext to clipboard and tiddler. I am however 
> foundering.
> If you ever feel so inclined I would love toolbar icons to do this for any 
> tiddler, this is a most impressive feature and it could be used in many 
> places including streams. No pressure, and yes I am saying it again, in 
> different words.
Below is a modified
tiddler. Now when you click on the "export tiddler" option, you get two 
more choices. One copies the rendered tiddler to HTML, and the other copies 
to plain text.

I don't think copying the all-up wikitext would be easy. There are no tools 
for collecting the *rendered output* of a tiddler as wikitext. You can get 
the parsetree(s), but then you'd have to turn them back into wikitext, 
which is likely to be non-trivial. You could capture the exact wikitext for 
the single tiddler, but that wouldn't be very useful.

If you hurry, the modifications here may be at 
https://marxsal.github.io/various/notowritey.html. While playing with the 
text, I accidentally posted it there. But I don't intend to have a change 
to the core as part of the NotoWritey distribution, so the next update will 
erase the changes. 


\define compile-h2()
<$transclude mode=block/>
\define compile-w2()
<$view field="text"/>
\define exportButtonFilename(baseFilename)

\define exportButton(exportFilter:"[!is[system]sort[title]]",lingoBase,
<span class="tc-popup-keep"><$button popup=<<qualify "$:/state/popup/export"
>> tooltip={{$lingoBase$Hint}} aria-label={{$lingoBase$Caption}} class=<<tv-
config-toolbar-class>> selectedClass="tc-selected">
<$list filter="[<tv-config-toolbar-icons>match[yes]]">
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text"><$text text={{$lingoBase$Caption}}/></span>
</$button></span><$reveal state=<<qualify "$:/state/popup/export">> type=
"popup" position="below" animate="yes">
<div class="tc-drop-down">
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Exporter]]">
<$set name="extension" value={{!!extension}}>
<$button class="tc-btn-invisible">
<$action-sendmessage $message="tm-download-file" $param=<<currentTiddler>> 
exportFilter="""$exportFilter$""" filename=<<exportButtonFilename 
<$action-deletetiddler $tiddler=<<qualify "$:/state/popup/export">>/>
<$transclude field="description"/>
<$wikify text="""<<compile-h2>>""" name="compiled" output="html">
<$button class="tc-btn-invisible" message="tm-copy-to-clipboard" 
param=<<compiled>> >
HTML -> clip
<$wikify text={{!!text}} name="compiled">
<$vars regexp="\n{2,}"  regexp2="\s{1,}\n" lf="""

<$button class="tc-btn-invisible" message="tm-copy-to-clipboard" 
param=<<compressed>> >
Text -> clipboard

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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Reply via email to