Re: [tw5] Transclude tiddler body in tooltip

2020-04-21 Thread 'Peter Buyze' via TiddlyWiki
A useful plug-in indeed. Nevertheless, when I hover over an internal link, the 
plug-in gives a preview but it is not in a distinct, well-readable floating 
box, rather it is transparent with the original tiddler's text visible.



20 Apr 2020, 22:03 by alecu...@gmail.com:

> I found > this amazing plugin 
> >  by Tobi Beer which does 
> almost exactly what I want — thanks Yoni for sharing the link!
>
> Does anyone have a guide / any clue as to how the same behaviour could be 
> preserved when exporting to a static website? (I have the Node.js version of 
> TW installed)
>
> Thanks so much.
>
> On Monday, April 20, 2020 at 5:39:53 PM UTC+1, Anne-Laure Le Cunff wrote:
>
>> That's a great idea, thank you!
>>
>> On Monday, April 20, 2020 at 3:18:08 PM UTC+1, Saq Imtiaz wrote:
>>
>>> If you would like to automate generating the caption, perhaps look into 
>>> generating and saving and excerpt in the caption field when a tiddler is 
>>> saved?
>>>
>
>
>
> --
>  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 > 
> https://groups.google.com/d/msgid/tiddlywiki/e6113f6f-37ff-4a26-8d2c-626ef8435480%40googlegroups.com
>  
> >
>  .
>

-- 
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 
https://groups.google.com/d/msgid/tiddlywiki/M5Qa4UC--3-2%40tutamail.com.


Re: [tw5] Transclude tiddler body in tooltip

2020-04-20 Thread Saq Imtiaz
Once you have those three tiddlers in your TiddlyWiki, save and reload. Add 
the macro from "For the view template" to the top your view template 
tiddler.

- Now everytime you edit and save a tiddler, the excerpt field will be 
auto-populated.
- The macro in the view template will help generate the appropriate 
attribute on the html of every link to support tippy.js

The missing piece then is adding tippy.js to your static site and 
initializing it.

Good night!

On Tuesday, April 21, 2020 at 1:24:10 AM UTC+2, Anne-Laure Le Cunff wrote:
>
> You should get some sleep! :) I'm super grateful for your help, thank you!
>
> On Tuesday, April 21, 2020 at 12:17:59 AM UTC+1, Saq Imtiaz wrote:
>>
>> I am running on not much sleep which probably isn't helping with writing 
>> the most coherent explanations :)
>>
>> Have a look at https://saqimtiaz.github.io/sq-tw/tooltips-tippyjs.html
>>
>> Of the open tiddlers examine and import to your TW the following (after 
>> backing up your data).
>>
>> $:/config/ui/EditTemplate
>> $:/MyEditTemplate
>> $:/sq/LinkWidgetTweak
>>
>> from the tiddler "For the view template" copy the macro 
>> tv-wikilink-excerpt to the top of your custom view template (which you 
>> posted in the thread earlier).
>>
>> Lastly, in the tiddler "For the view template" inspect the html for the 
>> link to HelloThere.
>>
>>
>>
>> On Tuesday, April 21, 2020 at 1:07:25 AM UTC+2, Anne-Laure Le Cunff wrote:
>>>
>>> Thanks Saq! I probably didn't understand step 2 properly, since this is 
>>> what I get when I click the "+" to create a new tiddler:
>>>
>>> [image: Screenshot 2020-04-21 at 12.05.40 AM.png]
>>>
>>>
>>> On Monday, April 20, 2020 at 11:57:44 PM UTC+1, Saq Imtiaz wrote:

 Anne-Laure: No. Create a new tiddler with any title (e.g 
 MyCustomEditTemplate) , and paste the contents I provided into it. No tag 
 needed.

 Step 2, where we edit $:/config/ui/EditTemplate and replace the 
 contents with the title you used in Step 1 (MyCustomEditTemplate), tells 
 TiddlyWiki to use an entirely different EditTemplate instead of the 
 default 
 one.

 The tag $:/tags/EditTemplate is used when you want to add something to 
 the existing template, we are replacing it entirely, so as to override the 
 macro that dicatates what happens when we save a tiddler. So do not tag 
 the 
 tiddler you create in step 1.

 Regards,
 Saq



 On Tuesday, April 21, 2020 at 12:47:56 AM UTC+2, Anne-Laure Le Cunff 
 wrote:
>
> Hi Saq,
>
> Thanks so much for this!
>
> Sorry for the newbie question, but can you confirm creating an Edit 
> Template consists in tagging the Tiddler with $:/tags/EditTemplate 
> 
> ?
>
> Thank you!
> Anne-Laure.
>
> On Monday, April 20, 2020 at 8:58:06 PM UTC+1, Saq Imtiaz wrote:
>>
>> Try the following:
>>
>> 1) Backup your data, this is untested.
>>
>> 2) Save this as a custom Edit Template, say with title MyEditTemplate:
>>
>> \define save-tiddler-actions()
>> <$action-sendmessage $message="tm-add-tag" $param={{{ 
>> [get[text]] }}}/>
>> <$action-deletetiddler $tiddler=<>/>
>> <$action-sendmessage $message="tm-add-field" $name={{{ 
>> [get[text]] }}} $value={{{ 
>> [get[text]] }}}/>
>> <$action-deletetiddler $tiddler=<>/>
>> <$action-deletetiddler $tiddler=<>/>
>> <$wikify name="tooltip" text={{!!text}}>
>> <$action-sendmessage $message="tm-add-field" $name="excerpt" 
>> $value={{{ [split[]first[120]join[]] }}} />
>> 
>> <$action-sendmessage $message="tm-save-tiddler"/>
>> \end
>> > data-tags={{!!tags}} 
>> class={{{ tc-tiddler-frame tc-tiddler-edit-frame 
>> [is[tiddler]then[tc-tiddler-exists]] 
>> [is[missing]!is[shadow]then[tc-tiddler-missing]] 
>> [is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] 
>> [is[system]then[tc-tiddler-system]] [{!!class}] 
>> [tags[]encodeuricomponent[]addprefix[tc-tagged-]] 
>> +[join[ 
>> ]] }}}>
>> <$fieldmangler>
>> <$vars storyTiddler=<> newTagNameTiddler=<> "$:/temp/NewTagName">> newFieldNameTiddler=<> "$:/temp/NewFieldName">> newFieldValueTiddler=<> "$:/temp/NewFieldValue">>>
>> <$keyboard key="((cancel-edit-tiddler))" message="tm-cancel-tiddler">
>> <$keyboard key="((save-tiddler))" actions=<>>
>> <$list 
>> filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" 
>> variable="listItem">
>> <$set name="tv-config-toolbar-class" 
>> filter="[] 
>> [encodeuricomponent[]addprefix[tc-btn-]]">
>> <$transclude tiddler=<>/>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 3) edit $:/config/ui/EditTemplate and replace its content with the 
>> title of the template tiddler you created in #2 above, so that our 

Re: [tw5] Transclude tiddler body in tooltip

2020-04-20 Thread Anne-Laure Le Cunff
You should get some sleep! :) I'm super grateful for your help, thank you!

On Tuesday, April 21, 2020 at 12:17:59 AM UTC+1, Saq Imtiaz wrote:
>
> I am running on not much sleep which probably isn't helping with writing 
> the most coherent explanations :)
>
> Have a look at https://saqimtiaz.github.io/sq-tw/tooltips-tippyjs.html
>
> Of the open tiddlers examine and import to your TW the following (after 
> backing up your data).
>
> $:/config/ui/EditTemplate
> $:/MyEditTemplate
> $:/sq/LinkWidgetTweak
>
> from the tiddler "For the view template" copy the macro 
> tv-wikilink-excerpt to the top of your custom view template (which you 
> posted in the thread earlier).
>
> Lastly, in the tiddler "For the view template" inspect the html for the 
> link to HelloThere.
>
>
>
> On Tuesday, April 21, 2020 at 1:07:25 AM UTC+2, Anne-Laure Le Cunff wrote:
>>
>> Thanks Saq! I probably didn't understand step 2 properly, since this is 
>> what I get when I click the "+" to create a new tiddler:
>>
>> [image: Screenshot 2020-04-21 at 12.05.40 AM.png]
>>
>>
>> On Monday, April 20, 2020 at 11:57:44 PM UTC+1, Saq Imtiaz wrote:
>>>
>>> Anne-Laure: No. Create a new tiddler with any title (e.g 
>>> MyCustomEditTemplate) , and paste the contents I provided into it. No tag 
>>> needed.
>>>
>>> Step 2, where we edit $:/config/ui/EditTemplate and replace the contents 
>>> with the title you used in Step 1 (MyCustomEditTemplate), tells TiddlyWiki 
>>> to use an entirely different EditTemplate instead of the default one.
>>>
>>> The tag $:/tags/EditTemplate is used when you want to add something to 
>>> the existing template, we are replacing it entirely, so as to override the 
>>> macro that dicatates what happens when we save a tiddler. So do not tag the 
>>> tiddler you create in step 1.
>>>
>>> Regards,
>>> Saq
>>>
>>>
>>>
>>> On Tuesday, April 21, 2020 at 12:47:56 AM UTC+2, Anne-Laure Le Cunff 
>>> wrote:

 Hi Saq,

 Thanks so much for this!

 Sorry for the newbie question, but can you confirm creating an Edit 
 Template consists in tagging the Tiddler with $:/tags/EditTemplate 
 
 ?

 Thank you!
 Anne-Laure.

 On Monday, April 20, 2020 at 8:58:06 PM UTC+1, Saq Imtiaz wrote:
>
> Try the following:
>
> 1) Backup your data, this is untested.
>
> 2) Save this as a custom Edit Template, say with title MyEditTemplate:
>
> \define save-tiddler-actions()
> <$action-sendmessage $message="tm-add-tag" $param={{{ 
> [get[text]] }}}/>
> <$action-deletetiddler $tiddler=<>/>
> <$action-sendmessage $message="tm-add-field" $name={{{ 
> [get[text]] }}} $value={{{ 
> [get[text]] }}}/>
> <$action-deletetiddler $tiddler=<>/>
> <$action-deletetiddler $tiddler=<>/>
> <$wikify name="tooltip" text={{!!text}}>
> <$action-sendmessage $message="tm-add-field" $name="excerpt" 
> $value={{{ [split[]first[120]join[]] }}} />
> 
> <$action-sendmessage $message="tm-save-tiddler"/>
> \end
> > data-tags={{!!tags}} 
> class={{{ tc-tiddler-frame tc-tiddler-edit-frame 
> [is[tiddler]then[tc-tiddler-exists]] 
> [is[missing]!is[shadow]then[tc-tiddler-missing]] 
> [is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] 
> [is[system]then[tc-tiddler-system]] [{!!class}] 
> [tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ 
> ]] }}}>
> <$fieldmangler>
> <$vars storyTiddler=<> newTagNameTiddler=< "$:/temp/NewTagName">> newFieldNameTiddler=< "$:/temp/NewFieldName">> newFieldValueTiddler=< "$:/temp/NewFieldValue">>>
> <$keyboard key="((cancel-edit-tiddler))" message="tm-cancel-tiddler">
> <$keyboard key="((save-tiddler))" actions=<>>
> <$list 
> filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" 
> variable="listItem">
> <$set name="tv-config-toolbar-class" 
> filter="[] 
> [encodeuricomponent[]addprefix[tc-btn-]]">
> <$transclude tiddler=<>/>
> 
> 
> 
> 
> 
> 
> 
>
> 3) edit $:/config/ui/EditTemplate and replace its content with the 
> title of the template tiddler you created in #2 above, so that our new 
> edit 
> template is used
>
> 4) Try editing and saving any tiddler, an excerpt should get saved 
> into a field called "excerpt"
>
> 5) use the excerpt field for the tooltip, you could also rename to 
> caption.
>
> 6) if all the above steps work reliably (and I believe they should), 
> next step could be to look into outputting html that would support 
> dropping 
> in a library like tippy.js in the static version to control the display 
> of 
> the tooltip. Tippy.js expects an attribute 
> data-tippy-content
> on links that contains the tooltip text to display.
>
> Hope this helps,
> Saq
>
> On 

Re: [tw5] Transclude tiddler body in tooltip

2020-04-20 Thread Saq Imtiaz
I am running on not much sleep which probably isn't helping with writing 
the most coherent explanations :)

Have a look at https://saqimtiaz.github.io/sq-tw/tooltips-tippyjs.html

Of the open tiddlers examine and import to your TW the following (after 
backing up your data).

$:/config/ui/EditTemplate
$:/MyEditTemplate
$:/sq/LinkWidgetTweak

from the tiddler "For the view template" copy the macro tv-wikilink-excerpt 
to the top of your custom view template (which you posted in the thread 
earlier).

Lastly, in the tiddler "For the view template" inspect the html for the 
link to HelloThere.



On Tuesday, April 21, 2020 at 1:07:25 AM UTC+2, Anne-Laure Le Cunff wrote:
>
> Thanks Saq! I probably didn't understand step 2 properly, since this is 
> what I get when I click the "+" to create a new tiddler:
>
> [image: Screenshot 2020-04-21 at 12.05.40 AM.png]
>
>
> On Monday, April 20, 2020 at 11:57:44 PM UTC+1, Saq Imtiaz wrote:
>>
>> Anne-Laure: No. Create a new tiddler with any title (e.g 
>> MyCustomEditTemplate) , and paste the contents I provided into it. No tag 
>> needed.
>>
>> Step 2, where we edit $:/config/ui/EditTemplate and replace the contents 
>> with the title you used in Step 1 (MyCustomEditTemplate), tells TiddlyWiki 
>> to use an entirely different EditTemplate instead of the default one.
>>
>> The tag $:/tags/EditTemplate is used when you want to add something to 
>> the existing template, we are replacing it entirely, so as to override the 
>> macro that dicatates what happens when we save a tiddler. So do not tag the 
>> tiddler you create in step 1.
>>
>> Regards,
>> Saq
>>
>>
>>
>> On Tuesday, April 21, 2020 at 12:47:56 AM UTC+2, Anne-Laure Le Cunff 
>> wrote:
>>>
>>> Hi Saq,
>>>
>>> Thanks so much for this!
>>>
>>> Sorry for the newbie question, but can you confirm creating an Edit 
>>> Template consists in tagging the Tiddler with $:/tags/EditTemplate 
>>> 
>>> ?
>>>
>>> Thank you!
>>> Anne-Laure.
>>>
>>> On Monday, April 20, 2020 at 8:58:06 PM UTC+1, Saq Imtiaz wrote:

 Try the following:

 1) Backup your data, this is untested.

 2) Save this as a custom Edit Template, say with title MyEditTemplate:

 \define save-tiddler-actions()
 <$action-sendmessage $message="tm-add-tag" $param={{{ 
 [get[text]] }}}/>
 <$action-deletetiddler $tiddler=<>/>
 <$action-sendmessage $message="tm-add-field" $name={{{ 
 [get[text]] }}} $value={{{ 
 [get[text]] }}}/>
 <$action-deletetiddler $tiddler=<>/>
 <$action-deletetiddler $tiddler=<>/>
 <$wikify name="tooltip" text={{!!text}}>
 <$action-sendmessage $message="tm-add-field" $name="excerpt" $value={{{ 
 [split[]first[120]join[]] }}} />
 
 <$action-sendmessage $message="tm-save-tiddler"/>
 \end
 > data-tags={{!!tags}} 
 class={{{ tc-tiddler-frame tc-tiddler-edit-frame 
 [is[tiddler]then[tc-tiddler-exists]] 
 [is[missing]!is[shadow]then[tc-tiddler-missing]] 
 [is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] 
 [is[system]then[tc-tiddler-system]] [{!!class}] 
 [tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ 
 ]] }}}>
 <$fieldmangler>
 <$vars storyTiddler=<> newTagNameTiddler=<>>> "$:/temp/NewTagName">> newFieldNameTiddler=<>>> "$:/temp/NewFieldName">> newFieldValueTiddler=<>>> "$:/temp/NewFieldValue">>>
 <$keyboard key="((cancel-edit-tiddler))" message="tm-cancel-tiddler">
 <$keyboard key="((save-tiddler))" actions=<>>
 <$list 
 filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" 
 variable="listItem">
 <$set name="tv-config-toolbar-class" 
 filter="[] 
 [encodeuricomponent[]addprefix[tc-btn-]]">
 <$transclude tiddler=<>/>
 
 
 
 
 
 
 

 3) edit $:/config/ui/EditTemplate and replace its content with the 
 title of the template tiddler you created in #2 above, so that our new 
 edit 
 template is used

 4) Try editing and saving any tiddler, an excerpt should get saved into 
 a field called "excerpt"

 5) use the excerpt field for the tooltip, you could also rename to 
 caption.

 6) if all the above steps work reliably (and I believe they should), 
 next step could be to look into outputting html that would support 
 dropping 
 in a library like tippy.js in the static version to control the display of 
 the tooltip. Tippy.js expects an attribute 
 data-tippy-content
 on links that contains the tooltip text to display.

 Hope this helps,
 Saq

 On Monday, April 20, 2020 at 9:39:54 PM UTC+2, Anne-Laure Le Cunff 
 wrote:
>
> @Saq - thank you for confirming! Didn't realise these were generated 
> on demand. That explains why it doesn't work with the static website.
>
> @Diego - totally missed that previous message. Thank you! 

Re: [tw5] Transclude tiddler body in tooltip

2020-04-20 Thread Anne-Laure Le Cunff
(just wanted to add I managed to reverse the changes back so there's no 
rush)

On Tuesday, April 21, 2020 at 12:07:25 AM UTC+1, Anne-Laure Le Cunff wrote:
>
> Thanks Saq! I probably didn't understand step 2 properly, since this is 
> what I get when I click the "+" to create a new tiddler:
>
> [image: Screenshot 2020-04-21 at 12.05.40 AM.png]
>
>
> On Monday, April 20, 2020 at 11:57:44 PM UTC+1, Saq Imtiaz wrote:
>>
>> Anne-Laure: No. Create a new tiddler with any title (e.g 
>> MyCustomEditTemplate) , and paste the contents I provided into it. No tag 
>> needed.
>>
>> Step 2, where we edit $:/config/ui/EditTemplate and replace the contents 
>> with the title you used in Step 1 (MyCustomEditTemplate), tells TiddlyWiki 
>> to use an entirely different EditTemplate instead of the default one.
>>
>> The tag $:/tags/EditTemplate is used when you want to add something to 
>> the existing template, we are replacing it entirely, so as to override the 
>> macro that dicatates what happens when we save a tiddler. So do not tag the 
>> tiddler you create in step 1.
>>
>> Regards,
>> Saq
>>
>>
>>
>> On Tuesday, April 21, 2020 at 12:47:56 AM UTC+2, Anne-Laure Le Cunff 
>> wrote:
>>>
>>> Hi Saq,
>>>
>>> Thanks so much for this!
>>>
>>> Sorry for the newbie question, but can you confirm creating an Edit 
>>> Template consists in tagging the Tiddler with $:/tags/EditTemplate 
>>> 
>>> ?
>>>
>>> Thank you!
>>> Anne-Laure.
>>>
>>> On Monday, April 20, 2020 at 8:58:06 PM UTC+1, Saq Imtiaz wrote:

 Try the following:

 1) Backup your data, this is untested.

 2) Save this as a custom Edit Template, say with title MyEditTemplate:

 \define save-tiddler-actions()
 <$action-sendmessage $message="tm-add-tag" $param={{{ 
 [get[text]] }}}/>
 <$action-deletetiddler $tiddler=<>/>
 <$action-sendmessage $message="tm-add-field" $name={{{ 
 [get[text]] }}} $value={{{ 
 [get[text]] }}}/>
 <$action-deletetiddler $tiddler=<>/>
 <$action-deletetiddler $tiddler=<>/>
 <$wikify name="tooltip" text={{!!text}}>
 <$action-sendmessage $message="tm-add-field" $name="excerpt" $value={{{ 
 [split[]first[120]join[]] }}} />
 
 <$action-sendmessage $message="tm-save-tiddler"/>
 \end
 > data-tags={{!!tags}} 
 class={{{ tc-tiddler-frame tc-tiddler-edit-frame 
 [is[tiddler]then[tc-tiddler-exists]] 
 [is[missing]!is[shadow]then[tc-tiddler-missing]] 
 [is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] 
 [is[system]then[tc-tiddler-system]] [{!!class}] 
 [tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ 
 ]] }}}>
 <$fieldmangler>
 <$vars storyTiddler=<> newTagNameTiddler=<>>> "$:/temp/NewTagName">> newFieldNameTiddler=<>>> "$:/temp/NewFieldName">> newFieldValueTiddler=<>>> "$:/temp/NewFieldValue">>>
 <$keyboard key="((cancel-edit-tiddler))" message="tm-cancel-tiddler">
 <$keyboard key="((save-tiddler))" actions=<>>
 <$list 
 filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" 
 variable="listItem">
 <$set name="tv-config-toolbar-class" 
 filter="[] 
 [encodeuricomponent[]addprefix[tc-btn-]]">
 <$transclude tiddler=<>/>
 
 
 
 
 
 
 

 3) edit $:/config/ui/EditTemplate and replace its content with the 
 title of the template tiddler you created in #2 above, so that our new 
 edit 
 template is used

 4) Try editing and saving any tiddler, an excerpt should get saved into 
 a field called "excerpt"

 5) use the excerpt field for the tooltip, you could also rename to 
 caption.

 6) if all the above steps work reliably (and I believe they should), 
 next step could be to look into outputting html that would support 
 dropping 
 in a library like tippy.js in the static version to control the display of 
 the tooltip. Tippy.js expects an attribute 
 data-tippy-content
 on links that contains the tooltip text to display.

 Hope this helps,
 Saq

 On Monday, April 20, 2020 at 9:39:54 PM UTC+2, Anne-Laure Le Cunff 
 wrote:
>
> @Saq - thank you for confirming! Didn't realise these were generated 
> on demand. That explains why it doesn't work with the static website.
>
> @Diego - totally missed that previous message. Thank you! Yes this is 
> exactly what I want.
>
> So, just to recapitulate where I'm at, I used a couple of solutions 
> that more or less worked once exported as a static website:
>
> *1)* Old school iframe which works on static website but doesn't look 
> great (see here , hover your mouse 
> on "Other Minds")
> *2)* Transclude caption into "tooltip" (which unfortunately uses the 
> default "title tooltip" from the browser so takes a long time to show 

Re: [tw5] Transclude tiddler body in tooltip

2020-04-20 Thread Anne-Laure Le Cunff
Thanks Saq! I probably didn't understand step 2 properly, since this is 
what I get when I click the "+" to create a new tiddler:

[image: Screenshot 2020-04-21 at 12.05.40 AM.png]


On Monday, April 20, 2020 at 11:57:44 PM UTC+1, Saq Imtiaz wrote:
>
> Anne-Laure: No. Create a new tiddler with any title (e.g 
> MyCustomEditTemplate) , and paste the contents I provided into it. No tag 
> needed.
>
> Step 2, where we edit $:/config/ui/EditTemplate and replace the contents 
> with the title you used in Step 1 (MyCustomEditTemplate), tells TiddlyWiki 
> to use an entirely different EditTemplate instead of the default one.
>
> The tag $:/tags/EditTemplate is used when you want to add something to the 
> existing template, we are replacing it entirely, so as to override the 
> macro that dicatates what happens when we save a tiddler. So do not tag the 
> tiddler you create in step 1.
>
> Regards,
> Saq
>
>
>
> On Tuesday, April 21, 2020 at 12:47:56 AM UTC+2, Anne-Laure Le Cunff wrote:
>>
>> Hi Saq,
>>
>> Thanks so much for this!
>>
>> Sorry for the newbie question, but can you confirm creating an Edit 
>> Template consists in tagging the Tiddler with $:/tags/EditTemplate 
>> 
>> ?
>>
>> Thank you!
>> Anne-Laure.
>>
>> On Monday, April 20, 2020 at 8:58:06 PM UTC+1, Saq Imtiaz wrote:
>>>
>>> Try the following:
>>>
>>> 1) Backup your data, this is untested.
>>>
>>> 2) Save this as a custom Edit Template, say with title MyEditTemplate:
>>>
>>> \define save-tiddler-actions()
>>> <$action-sendmessage $message="tm-add-tag" $param={{{ 
>>> [get[text]] }}}/>
>>> <$action-deletetiddler $tiddler=<>/>
>>> <$action-sendmessage $message="tm-add-field" $name={{{ 
>>> [get[text]] }}} $value={{{ 
>>> [get[text]] }}}/>
>>> <$action-deletetiddler $tiddler=<>/>
>>> <$action-deletetiddler $tiddler=<>/>
>>> <$wikify name="tooltip" text={{!!text}}>
>>> <$action-sendmessage $message="tm-add-field" $name="excerpt" $value={{{ 
>>> [split[]first[120]join[]] }}} />
>>> 
>>> <$action-sendmessage $message="tm-save-tiddler"/>
>>> \end
>>> > data-tags={{!!tags}} 
>>> class={{{ tc-tiddler-frame tc-tiddler-edit-frame 
>>> [is[tiddler]then[tc-tiddler-exists]] 
>>> [is[missing]!is[shadow]then[tc-tiddler-missing]] 
>>> [is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] 
>>> [is[system]then[tc-tiddler-system]] [{!!class}] 
>>> [tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ 
>>> ]] }}}>
>>> <$fieldmangler>
>>> <$vars storyTiddler=<> newTagNameTiddler=<>> "$:/temp/NewTagName">> newFieldNameTiddler=<>> "$:/temp/NewFieldName">> newFieldValueTiddler=<>> "$:/temp/NewFieldValue">>>
>>> <$keyboard key="((cancel-edit-tiddler))" message="tm-cancel-tiddler">
>>> <$keyboard key="((save-tiddler))" actions=<>>
>>> <$list 
>>> filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" 
>>> variable="listItem">
>>> <$set name="tv-config-toolbar-class" filter="[] 
>>> [encodeuricomponent[]addprefix[tc-btn-]]">
>>> <$transclude tiddler=<>/>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>> 3) edit $:/config/ui/EditTemplate and replace its content with the title 
>>> of the template tiddler you created in #2 above, so that our new edit 
>>> template is used
>>>
>>> 4) Try editing and saving any tiddler, an excerpt should get saved into 
>>> a field called "excerpt"
>>>
>>> 5) use the excerpt field for the tooltip, you could also rename to 
>>> caption.
>>>
>>> 6) if all the above steps work reliably (and I believe they should), 
>>> next step could be to look into outputting html that would support dropping 
>>> in a library like tippy.js in the static version to control the display of 
>>> the tooltip. Tippy.js expects an attribute 
>>> data-tippy-content
>>> on links that contains the tooltip text to display.
>>>
>>> Hope this helps,
>>> Saq
>>>
>>> On Monday, April 20, 2020 at 9:39:54 PM UTC+2, Anne-Laure Le Cunff wrote:

 @Saq - thank you for confirming! Didn't realise these were generated on 
 demand. That explains why it doesn't work with the static website.

 @Diego - totally missed that previous message. Thank you! Yes this is 
 exactly what I want.

 So, just to recapitulate where I'm at, I used a couple of solutions 
 that more or less worked once exported as a static website:

 *1)* Old school iframe which works on static website but doesn't look 
 great (see here , hover your mouse 
 on "Other Minds")
 *2)* Transclude caption into "tooltip" (which unfortunately uses the 
 default "title tooltip" from the browser so takes a long time to show up)

 *\define tv-wikilink-tooltip()*
 *<$transclude field="tooltip"><$transclude 
 field="caption"/>*
 *\end*

 *Here is a link to [[Title of Tiddler]] with a custom tooltip.*

 And I added a "caption" field to each Tiddler. Works once exported to 
 static website. Pretty 

Re: [tw5] Transclude tiddler body in tooltip

2020-04-20 Thread Saq Imtiaz
Anne-Laure: No. Create a new tiddler with any title (e.g 
MyCustomEditTemplate) , and paste the contents I provided into it. No tag 
needed.

Step 2, where we edit $:/config/ui/EditTemplate and replace the contents 
with the title you used in Step 1 (MyCustomEditTemplate), tells TiddlyWiki 
to use an entirely different EditTemplate instead of the default one.

The tag $:/tags/EditTemplate is used when you want to add something to the 
existing template, we are replacing it entirely, so as to override the 
macro that dicatates what happens when we save a tiddler. So do not tag the 
tiddler you create in step 1.

Regards,
Saq



On Tuesday, April 21, 2020 at 12:47:56 AM UTC+2, Anne-Laure Le Cunff wrote:
>
> Hi Saq,
>
> Thanks so much for this!
>
> Sorry for the newbie question, but can you confirm creating an Edit 
> Template consists in tagging the Tiddler with $:/tags/EditTemplate 
> 
> ?
>
> Thank you!
> Anne-Laure.
>
> On Monday, April 20, 2020 at 8:58:06 PM UTC+1, Saq Imtiaz wrote:
>>
>> Try the following:
>>
>> 1) Backup your data, this is untested.
>>
>> 2) Save this as a custom Edit Template, say with title MyEditTemplate:
>>
>> \define save-tiddler-actions()
>> <$action-sendmessage $message="tm-add-tag" $param={{{ 
>> [get[text]] }}}/>
>> <$action-deletetiddler $tiddler=<>/>
>> <$action-sendmessage $message="tm-add-field" $name={{{ 
>> [get[text]] }}} $value={{{ 
>> [get[text]] }}}/>
>> <$action-deletetiddler $tiddler=<>/>
>> <$action-deletetiddler $tiddler=<>/>
>> <$wikify name="tooltip" text={{!!text}}>
>> <$action-sendmessage $message="tm-add-field" $name="excerpt" $value={{{ 
>> [split[]first[120]join[]] }}} />
>> 
>> <$action-sendmessage $message="tm-save-tiddler"/>
>> \end
>> > data-tags={{!!tags}} class={{{ 
>> tc-tiddler-frame tc-tiddler-edit-frame 
>> [is[tiddler]then[tc-tiddler-exists]] 
>> [is[missing]!is[shadow]then[tc-tiddler-missing]] 
>> [is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] 
>> [is[system]then[tc-tiddler-system]] [{!!class}] 
>> [tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ 
>> ]] }}}>
>> <$fieldmangler>
>> <$vars storyTiddler=<> newTagNameTiddler=<> "$:/temp/NewTagName">> newFieldNameTiddler=<> "$:/temp/NewFieldName">> newFieldValueTiddler=<> "$:/temp/NewFieldValue">>>
>> <$keyboard key="((cancel-edit-tiddler))" message="tm-cancel-tiddler">
>> <$keyboard key="((save-tiddler))" actions=<>>
>> <$list 
>> filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" 
>> variable="listItem">
>> <$set name="tv-config-toolbar-class" filter="[] 
>> [encodeuricomponent[]addprefix[tc-btn-]]">
>> <$transclude tiddler=<>/>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 3) edit $:/config/ui/EditTemplate and replace its content with the title 
>> of the template tiddler you created in #2 above, so that our new edit 
>> template is used
>>
>> 4) Try editing and saving any tiddler, an excerpt should get saved into a 
>> field called "excerpt"
>>
>> 5) use the excerpt field for the tooltip, you could also rename to 
>> caption.
>>
>> 6) if all the above steps work reliably (and I believe they should), next 
>> step could be to look into outputting html that would support dropping in a 
>> library like tippy.js in the static version to control the display of the 
>> tooltip. Tippy.js expects an attribute 
>> data-tippy-content
>> on links that contains the tooltip text to display.
>>
>> Hope this helps,
>> Saq
>>
>> On Monday, April 20, 2020 at 9:39:54 PM UTC+2, Anne-Laure Le Cunff wrote:
>>>
>>> @Saq - thank you for confirming! Didn't realise these were generated on 
>>> demand. That explains why it doesn't work with the static website.
>>>
>>> @Diego - totally missed that previous message. Thank you! Yes this is 
>>> exactly what I want.
>>>
>>> So, just to recapitulate where I'm at, I used a couple of solutions that 
>>> more or less worked once exported as a static website:
>>>
>>> *1)* Old school iframe which works on static website but doesn't look 
>>> great (see here , hover your mouse on 
>>> "Other Minds")
>>> *2)* Transclude caption into "tooltip" (which unfortunately uses the 
>>> default "title tooltip" from the browser so takes a long time to show up)
>>>
>>> *\define tv-wikilink-tooltip()*
>>> *<$transclude field="tooltip"><$transclude 
>>> field="caption"/>*
>>> *\end*
>>>
>>> *Here is a link to [[Title of Tiddler]] with a custom tooltip.*
>>>
>>> And I added a "caption" field to each Tiddler. Works once exported to 
>>> static website. Pretty happy with this except that the tooltip takes a long 
>>> time to appear. I much prefer the look and speed of the ones in Tobi Beer's 
>>> plugin.
>>>
>>> ---
>>>
>>> *3)* Use Tobi Beer's plugin 
>>> , which transcludes the 
>>> whole target article (see demo 
>>> , 
>>> 

Re: [tw5] Transclude tiddler body in tooltip

2020-04-20 Thread Anne-Laure Le Cunff
Hi Saq,

Thanks so much for this!

Sorry for the newbie question, but can you confirm creating an Edit 
Template consists in tagging the Tiddler with $:/tags/EditTemplate 

?

Thank you!
Anne-Laure.

On Monday, April 20, 2020 at 8:58:06 PM UTC+1, Saq Imtiaz wrote:
>
> Try the following:
>
> 1) Backup your data, this is untested.
>
> 2) Save this as a custom Edit Template, say with title MyEditTemplate:
>
> \define save-tiddler-actions()
> <$action-sendmessage $message="tm-add-tag" $param={{{ 
> [get[text]] }}}/>
> <$action-deletetiddler $tiddler=<>/>
> <$action-sendmessage $message="tm-add-field" $name={{{ 
> [get[text]] }}} $value={{{ 
> [get[text]] }}}/>
> <$action-deletetiddler $tiddler=<>/>
> <$action-deletetiddler $tiddler=<>/>
> <$wikify name="tooltip" text={{!!text}}>
> <$action-sendmessage $message="tm-add-field" $name="excerpt" $value={{{ 
> [split[]first[120]join[]] }}} />
> 
> <$action-sendmessage $message="tm-save-tiddler"/>
> \end
> > data-tags={{!!tags}} class={{{ 
> tc-tiddler-frame tc-tiddler-edit-frame 
> [is[tiddler]then[tc-tiddler-exists]] 
> [is[missing]!is[shadow]then[tc-tiddler-missing]] 
> [is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] 
> [is[system]then[tc-tiddler-system]] [{!!class}] 
> [tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ 
> ]] }}}>
> <$fieldmangler>
> <$vars storyTiddler=<> newTagNameTiddler=< "$:/temp/NewTagName">> newFieldNameTiddler=< "$:/temp/NewFieldName">> newFieldValueTiddler=< "$:/temp/NewFieldValue">>>
> <$keyboard key="((cancel-edit-tiddler))" message="tm-cancel-tiddler">
> <$keyboard key="((save-tiddler))" actions=<>>
> <$list 
> filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" 
> variable="listItem">
> <$set name="tv-config-toolbar-class" filter="[] 
> [encodeuricomponent[]addprefix[tc-btn-]]">
> <$transclude tiddler=<>/>
> 
> 
> 
> 
> 
> 
> 
>
> 3) edit $:/config/ui/EditTemplate and replace its content with the title 
> of the template tiddler you created in #2 above, so that our new edit 
> template is used
>
> 4) Try editing and saving any tiddler, an excerpt should get saved into a 
> field called "excerpt"
>
> 5) use the excerpt field for the tooltip, you could also rename to caption.
>
> 6) if all the above steps work reliably (and I believe they should), next 
> step could be to look into outputting html that would support dropping in a 
> library like tippy.js in the static version to control the display of the 
> tooltip. Tippy.js expects an attribute 
> data-tippy-content
> on links that contains the tooltip text to display.
>
> Hope this helps,
> Saq
>
> On Monday, April 20, 2020 at 9:39:54 PM UTC+2, Anne-Laure Le Cunff wrote:
>>
>> @Saq - thank you for confirming! Didn't realise these were generated on 
>> demand. That explains why it doesn't work with the static website.
>>
>> @Diego - totally missed that previous message. Thank you! Yes this is 
>> exactly what I want.
>>
>> So, just to recapitulate where I'm at, I used a couple of solutions that 
>> more or less worked once exported as a static website:
>>
>> *1)* Old school iframe which works on static website but doesn't look 
>> great (see here , hover your mouse on 
>> "Other Minds")
>> *2)* Transclude caption into "tooltip" (which unfortunately uses the 
>> default "title tooltip" from the browser so takes a long time to show up)
>>
>> *\define tv-wikilink-tooltip()*
>> *<$transclude field="tooltip"><$transclude 
>> field="caption"/>*
>> *\end*
>>
>> *Here is a link to [[Title of Tiddler]] with a custom tooltip.*
>>
>> And I added a "caption" field to each Tiddler. Works once exported to 
>> static website. Pretty happy with this except that the tooltip takes a long 
>> time to appear. I much prefer the look and speed of the ones in Tobi Beer's 
>> plugin.
>>
>> ---
>>
>> *3)* Use Tobi Beer's plugin 
>> , which transcludes the 
>> whole target article (see demo 
>> , 
>> maybe a bit over the top). Works great on TW itself but doesn't work (as 
>> Saq confirmed) when exported to a static website.
>>
>> So my question is... Do you think there's a way to implement #2 (display 
>> caption field in tooltip) with the look and speed of #3 (Tobi Beer's 
>> plugin)?
>>
>> Sorry for the rambling, and thanks so much for your help!
>>
>>
>> On Monday, April 20, 2020 at 8:26:17 PM UTC+1, Diego Mesa wrote:
>>>
>>> Anne-Laure,
>>>
>>> For reference/completion, Tobi Beer's plugin was also the solution I 
>>> proposed in this thread you started about "how to show link preview on 
>>> hover in static websites" not that long ago:
>>>
>>> https://groups.google.com/d/msg/TiddlyWiki/_7ozNvkpPVg/vHXL1Ae4AgAJ
>>>
>>> Diego
>>>
>>> On Monday, April 20, 2020 at 2:03:12 PM UTC-5, Anne-Laure Le Cunff wrote:

 I found this 

Re: [tw5] Transclude tiddler body in tooltip

2020-04-20 Thread Saq Imtiaz
Try the following:

1) Backup your data, this is untested.

2) Save this as a custom Edit Template, say with title MyEditTemplate:

\define save-tiddler-actions()
<$action-sendmessage $message="tm-add-tag" $param={{{ 
[get[text]] }}}/>
<$action-deletetiddler $tiddler=<>/>
<$action-sendmessage $message="tm-add-field" $name={{{ 
[get[text]] }}} $value={{{ 
[get[text]] }}}/>
<$action-deletetiddler $tiddler=<>/>
<$action-deletetiddler $tiddler=<>/>
<$wikify name="tooltip" text={{!!text}}>
<$action-sendmessage $message="tm-add-field" $name="excerpt" $value={{{ 
[split[]first[120]join[]] }}} />

<$action-sendmessage $message="tm-save-tiddler"/>
\end
> data-tags={{!!tags}} class={{{ 
tc-tiddler-frame tc-tiddler-edit-frame 
[is[tiddler]then[tc-tiddler-exists]] 
[is[missing]!is[shadow]then[tc-tiddler-missing]] 
[is[shadow]then[tc-tiddler-exists tc-tiddler-shadow]] 
[is[system]then[tc-tiddler-system]] [{!!class}] 
[tags[]encodeuricomponent[]addprefix[tc-tagged-]] +[join[ 
]] }}}>
<$fieldmangler>
<$vars storyTiddler=<> newTagNameTiddler=<> newFieldNameTiddler=<> newFieldValueTiddler=<>>
<$keyboard key="((cancel-edit-tiddler))" message="tm-cancel-tiddler">
<$keyboard key="((save-tiddler))" actions=<>>
<$list 
filter="[all[shadows+tiddlers]tag[$:/tags/EditTemplate]!has[draft.of]]" 
variable="listItem">
<$set name="tv-config-toolbar-class" filter="[] 
[encodeuricomponent[]addprefix[tc-btn-]]">
<$transclude tiddler=<>/>








3) edit $:/config/ui/EditTemplate and replace its content with the title of 
the template tiddler you created in #2 above, so that our new edit template 
is used

4) Try editing and saving any tiddler, an excerpt should get saved into a 
field called "excerpt"

5) use the excerpt field for the tooltip, you could also rename to caption.

6) if all the above steps work reliably (and I believe they should), next 
step could be to look into outputting html that would support dropping in a 
library like tippy.js in the static version to control the display of the 
tooltip. Tippy.js expects an attribute 
data-tippy-content
on links that contains the tooltip text to display.

Hope this helps,
Saq

On Monday, April 20, 2020 at 9:39:54 PM UTC+2, Anne-Laure Le Cunff wrote:
>
> @Saq - thank you for confirming! Didn't realise these were generated on 
> demand. That explains why it doesn't work with the static website.
>
> @Diego - totally missed that previous message. Thank you! Yes this is 
> exactly what I want.
>
> So, just to recapitulate where I'm at, I used a couple of solutions that 
> more or less worked once exported as a static website:
>
> *1)* Old school iframe which works on static website but doesn't look 
> great (see here , hover your mouse on 
> "Other Minds")
> *2)* Transclude caption into "tooltip" (which unfortunately uses the 
> default "title tooltip" from the browser so takes a long time to show up)
>
> *\define tv-wikilink-tooltip()*
> *<$transclude field="tooltip"><$transclude field="caption"/>*
> *\end*
>
> *Here is a link to [[Title of Tiddler]] with a custom tooltip.*
>
> And I added a "caption" field to each Tiddler. Works once exported to 
> static website. Pretty happy with this except that the tooltip takes a long 
> time to appear. I much prefer the look and speed of the ones in Tobi Beer's 
> plugin.
>
> ---
>
> *3)* Use Tobi Beer's plugin 
> , which transcludes the 
> whole target article (see demo 
> , 
> maybe a bit over the top). Works great on TW itself but doesn't work (as 
> Saq confirmed) when exported to a static website.
>
> So my question is... Do you think there's a way to implement #2 (display 
> caption field in tooltip) with the look and speed of #3 (Tobi Beer's 
> plugin)?
>
> Sorry for the rambling, and thanks so much for your help!
>
>
> On Monday, April 20, 2020 at 8:26:17 PM UTC+1, Diego Mesa wrote:
>>
>> Anne-Laure,
>>
>> For reference/completion, Tobi Beer's plugin was also the solution I 
>> proposed in this thread you started about "how to show link preview on 
>> hover in static websites" not that long ago:
>>
>> https://groups.google.com/d/msg/TiddlyWiki/_7ozNvkpPVg/vHXL1Ae4AgAJ
>>
>> Diego
>>
>> On Monday, April 20, 2020 at 2:03:12 PM UTC-5, Anne-Laure Le Cunff wrote:
>>>
>>> I found this amazing plugin 
>>>  by Tobi Beer which 
>>> does almost exactly what I want — thanks Yoni for sharing the link!
>>>
>>> Does anyone have a guide / any clue as to how the same behaviour could 
>>> be preserved when exporting to a static website? (I have the Node.js 
>>> version of TW installed)
>>>
>>> Thanks so much.
>>>
>>> On Monday, April 20, 2020 at 5:39:53 PM UTC+1, Anne-Laure Le Cunff wrote:

 That's a great idea, thank you!

 On Monday, April 20, 2020 at 3:18:08 PM UTC+1, Saq Imtiaz wrote:
>
> If you would like to automate 

Re: [tw5] Transclude tiddler body in tooltip

2020-04-20 Thread Anne-Laure Le Cunff
@Saq - thank you for confirming! Didn't realise these were generated on 
demand. That explains why it doesn't work with the static website.

@Diego - totally missed that previous message. Thank you! Yes this is 
exactly what I want.

So, just to recapitulate where I'm at, I used a couple of solutions that 
more or less worked once exported as a static website:

*1)* Old school iframe which works on static website but doesn't look great 
(see here , hover your mouse on "Other 
Minds")
*2)* Transclude caption into "tooltip" (which unfortunately uses the 
default "title tooltip" from the browser so takes a long time to show up)

*\define tv-wikilink-tooltip()*
*<$transclude field="tooltip"><$transclude field="caption"/>*
*\end*

*Here is a link to [[Title of Tiddler]] with a custom tooltip.*

And I added a "caption" field to each Tiddler. Works once exported to 
static website. Pretty happy with this except that the tooltip takes a long 
time to appear. I much prefer the look and speed of the ones in Tobi Beer's 
plugin.

---

*3)* Use Tobi Beer's plugin , 
which transcludes the whole target article (see demo 
, 
maybe a bit over the top). Works great on TW itself but doesn't work (as 
Saq confirmed) when exported to a static website.

So my question is... Do you think there's a way to implement #2 (display 
caption field in tooltip) with the look and speed of #3 (Tobi Beer's 
plugin)?

Sorry for the rambling, and thanks so much for your help!


On Monday, April 20, 2020 at 8:26:17 PM UTC+1, Diego Mesa wrote:
>
> Anne-Laure,
>
> For reference/completion, Tobi Beer's plugin was also the solution I 
> proposed in this thread you started about "how to show link preview on 
> hover in static websites" not that long ago:
>
> https://groups.google.com/d/msg/TiddlyWiki/_7ozNvkpPVg/vHXL1Ae4AgAJ
>
> Diego
>
> On Monday, April 20, 2020 at 2:03:12 PM UTC-5, Anne-Laure Le Cunff wrote:
>>
>> I found this amazing plugin 
>>  by Tobi Beer which does 
>> almost exactly what I want — thanks Yoni for sharing the link!
>>
>> Does anyone have a guide / any clue as to how the same behaviour could be 
>> preserved when exporting to a static website? (I have the Node.js version 
>> of TW installed)
>>
>> Thanks so much.
>>
>> On Monday, April 20, 2020 at 5:39:53 PM UTC+1, Anne-Laure Le Cunff wrote:
>>>
>>> That's a great idea, thank you!
>>>
>>> On Monday, April 20, 2020 at 3:18:08 PM UTC+1, Saq Imtiaz wrote:

 If you would like to automate generating the caption, perhaps look into 
 generating and saving and excerpt in the caption field when a tiddler is 
 saved?
>>>
>>>

-- 
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 
https://groups.google.com/d/msgid/tiddlywiki/f3809319-4eb8-4531-89c6-d417223e3b23%40googlegroups.com.


Re: [tw5] Transclude tiddler body in tooltip

2020-04-20 Thread Diego Mesa
Anne-Laure,

For reference/completion, Tobi Beer's plugin was also the solution I 
proposed in this thread you started about "how to show link preview on 
hover in static websites" not that long ago:

https://groups.google.com/d/msg/TiddlyWiki/_7ozNvkpPVg/vHXL1Ae4AgAJ

Diego

On Monday, April 20, 2020 at 2:03:12 PM UTC-5, Anne-Laure Le Cunff wrote:
>
> I found this amazing plugin 
>  by Tobi Beer which does 
> almost exactly what I want — thanks Yoni for sharing the link!
>
> Does anyone have a guide / any clue as to how the same behaviour could be 
> preserved when exporting to a static website? (I have the Node.js version 
> of TW installed)
>
> Thanks so much.
>
> On Monday, April 20, 2020 at 5:39:53 PM UTC+1, Anne-Laure Le Cunff wrote:
>>
>> That's a great idea, thank you!
>>
>> On Monday, April 20, 2020 at 3:18:08 PM UTC+1, Saq Imtiaz wrote:
>>>
>>> If you would like to automate generating the caption, perhaps look into 
>>> generating and saving and excerpt in the caption field when a tiddler is 
>>> saved?
>>
>>

-- 
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 
https://groups.google.com/d/msgid/tiddlywiki/68d33556-6bfb-466f-9ebb-1ac650dfc09a%40googlegroups.com.


Re: [tw5] Transclude tiddler body in tooltip

2020-04-20 Thread Saq Imtiaz
The source code of that plugin has been compressed and obfuscated, however 
I suspect it calculates and renders the preview on demand, i.e. when you 
hover over a link. That won't work when exported to a static website, 
unless there is javascript library that we can drop in that can do the same 
for static html sites.

Otherwisem I think your best bet is probably to look into modifying the 
behaviour of the save button in the edit template, to see if you can save 
text for the preview into a separate field when a tiddler is saved.

On Monday, April 20, 2020 at 9:03:12 PM UTC+2, Anne-Laure Le Cunff wrote:
>
> I found this amazing plugin 
>  by Tobi Beer which does 
> almost exactly what I want — thanks Yoni for sharing the link!
>
> Does anyone have a guide / any clue as to how the same behaviour could be 
> preserved when exporting to a static website? (I have the Node.js version 
> of TW installed)
>
> Thanks so much.
>
> On Monday, April 20, 2020 at 5:39:53 PM UTC+1, Anne-Laure Le Cunff wrote:
>>
>> That's a great idea, thank you!
>>
>> On Monday, April 20, 2020 at 3:18:08 PM UTC+1, Saq Imtiaz wrote:
>>>
>>> If you would like to automate generating the caption, perhaps look into 
>>> generating and saving and excerpt in the caption field when a tiddler is 
>>> saved?
>>
>>

-- 
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 
https://groups.google.com/d/msgid/tiddlywiki/75ba2723-f9fa-48d1-812e-41a4440d7c5b%40googlegroups.com.


Re: [tw5] Transclude tiddler body in tooltip

2020-04-20 Thread Anne-Laure Le Cunff
I found this amazing plugin  
by Tobi Beer which does almost exactly what I want — thanks Yoni for 
sharing the link!

Does anyone have a guide / any clue as to how the same behaviour could be 
preserved when exporting to a static website? (I have the Node.js version 
of TW installed)

Thanks so much.

On Monday, April 20, 2020 at 5:39:53 PM UTC+1, Anne-Laure Le Cunff wrote:
>
> That's a great idea, thank you!
>
> On Monday, April 20, 2020 at 3:18:08 PM UTC+1, Saq Imtiaz wrote:
>>
>> If you would like to automate generating the caption, perhaps look into 
>> generating and saving and excerpt in the caption field when a tiddler is 
>> saved?
>
>

-- 
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 
https://groups.google.com/d/msgid/tiddlywiki/e6113f6f-37ff-4a26-8d2c-626ef8435480%40googlegroups.com.


Re: [tw5] Transclude tiddler body in tooltip

2020-04-20 Thread Anne-Laure Le Cunff
That's a great idea, thank you!

On Monday, April 20, 2020 at 3:18:08 PM UTC+1, Saq Imtiaz wrote:
>
> If you would like to automate generating the caption, perhaps look into 
> generating and saving and excerpt in the caption field when a tiddler is 
> saved?

-- 
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 
https://groups.google.com/d/msgid/tiddlywiki/4f1c6576-7d9c-4d2f-8ed7-28c73ff41b5a%40googlegroups.com.


Re: [tw5] Transclude tiddler body in tooltip

2020-04-20 Thread Saq Imtiaz
If you would like to automate generating the caption, perhaps look into 
generating and saving and excerpt in the caption field when a tiddler is saved?

-- 
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 
https://groups.google.com/d/msgid/tiddlywiki/fe1e5c9d-57fb-4d75-8b24-0f531f8222c3%40googlegroups.com.


Re: [tw5] Transclude tiddler body in tooltip

2020-04-20 Thread Jeremy Ruston
Hi Anne-Laure,

OK, that is indeed a custom view template, and it doesn’t include support for 
$:/tags/Macro/View. If you wanted to, you could add this as the first line of 
the tiddler:

\import [all[shadows+tiddlers]tag[$:/tags/Macro/View]!has[draft.of]]

Best wishes

Jeremy.

> On 20 Apr 2020, at 14:35, Anne-Laure Le Cunff  wrote:
> 
> Hi Jeremy,
> 
> No, I used this tutorial  as I'm using TW as a 
> static website generator, so my clone looks like this:
> 
> \define folded-state()
> $:/state/folded/$(currentTiddler)$
> \end
> 
> 
>   
> 
>   
> <$view field="title"/>
> <$transclude mode="block"/>
>   
> 
> 
>   
> Last edited <$view field="modified" 
> format="date" template="DDth MMM "/>
> Backlinks
> < filter:"[all[current]backlinks[]]+[!tag[hide]]+[!has[draft.of]]+[!is[system]sort[]]"
>  class:"list-unstyled">>
>   
> 
>   
> 
> 
> Maybe that's what's causing the issue. In the mean time, I decided to 
> transclude the caption instead and will add these manually, hopefully should 
> keep on working as I add notes :)
> 
> Thank you!
> 
> 
>   
> 
>   
> <$view field="title"/>
> <$transclude mode="block"/>
>   
> 
> 
>   
> Last edited <$view field="modified" 
> format="date" template="DDth MMM "/>
> Backlinks
> < filter:"[all[current]backlinks[]]+[!tag[hide]]+[!has[draft.of]]+[!is[system]sort[]]"
>  class:"list-unstyled">>
>   
> 
>   
> 
> 
> On Monday, April 20, 2020 at 2:28:24 PM UTC+1, Jeremy Ruston wrote:
> Hi Anne Laure
> 
>> I created a macro but $:/tags/Macro/View doesn't work - is it because I'm 
>> using a clone of the core view template? 
>> ($:/ness_labs/template/static-view-template)
> 
> That’s strange. Does your clone still include the line "\import 
> [all[shadows+tiddlers]tag[$:/tags/Macro/View]!has[draft.of]]”?
> 
>> If so, which tag should I use to target it?
> 
>> It does work with just $:/tags/Macro but probably defeats the purpose.
> 
> It’ll only make a difference if you’ve got a significant number of links 
> outside of the view template (e.g. in the sidebar).
> 
> Best wishes
> 
> Jeremy,
> 
> 
>> 
>> Many thanks!
>> Anne-Laure.
>> 
>> 
>> 
>> 
>> 
>> On Monday, April 20, 2020 at 1:02:53 PM UTC+1, Jeremy Ruston wrote:
>> Hi Tony 
>> 
>> > On 20 Apr 2020, at 12:49, TonyM > wrote: 
>> > 
>> > The transclude text is transcluding the current tiddlers text which 
>> > transcludes the current tiddlers text to infinity 
>> 
>> TiddlyWiki does in fact have built-in protection against infinitely 
>> recursive transclusion loops. It doesn’t (yet) have such protections for 
>> recursive macros. 
>> 
>> Best wishes 
>> 
>> Jeremy. 
>> 
>> > 
>> > Regards 
>> > Tony 
>> > 
>> > -- 
>> > 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 tiddl...@googlegroups.com <>. 
>> > To view this discussion on the web visit 
>> > https://groups.google.com/d/msgid/tiddlywiki/7c7564ed-369f-4062-8d94-d3015fad032e%40googlegroups.com
>> >  
>> > .
>> >  
>> 
>> 
>> -- 
>> 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 tiddl...@ <>googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/1fa406f3-9c31-4f73-98e2-6b737c0c7e85%40googlegroups.com
>>  
>> .
> 
> 
> -- 
> 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 
> https://groups.google.com/d/msgid/tiddlywiki/50f7c90d-fcf6-4301-ac32-60b24b265d3c%40googlegroups.com
>  
> .

-- 
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 
https://groups.google.com/d/msgid/tiddlywiki/C835612F-3FD7-4BB2-81B8-9BACC3A8E724%40gmail.com.


Re: [tw5] Transclude tiddler body in tooltip

2020-04-20 Thread Anne-Laure Le Cunff
Hi Jeremy,

No, I used this tutorial  as I'm using TW as 
a static website generator, so my clone looks like this:

*\define folded-state()*
*$:/state/folded/$(currentTiddler)$*
*\end*

**
*  *
**
*  *
*<$view field="title"/>*
*<$transclude mode="block"/>*
*  *
**
**
*  *
*Last edited <$view field="modified" 
format="date" template="DDth MMM "/>*
*Backlinks*
*<>*
*  *
**
*  *
**


Maybe that's what's causing the issue. In the mean time, I decided to 
transclude the caption instead and will add these manually, hopefully 
should keep on working as I add notes :)

Thank you!


  

  
<$view field="title"/>
<$transclude mode="block"/>
  


  
Last edited <$view field="modified" 
format="date" template="DDth MMM "/>
Backlinks
<>
  

  


On Monday, April 20, 2020 at 2:28:24 PM UTC+1, Jeremy Ruston wrote:
>
> Hi Anne Laure
>
> I created a macro but $:/tags/Macro/View doesn't work - is it because I'm 
> using a clone of the core view template? (
> *$:/ness_labs/template/static-view-template*)
>
>
> That’s strange. Does your clone still include the line "\import 
> [all[shadows+tiddlers]tag[$:/tags/Macro/View]!has[draft.of]]”?
>
> If so, which tag should I use to target it?
>
>
> It does work with just $:/tags/Macro but probably defeats the purpose.
>
>
> It’ll only make a difference if you’ve got a significant number of links 
> outside of the view template (e.g. in the sidebar).
>
> Best wishes
>
> Jeremy,
>
>
>
> Many thanks!
> Anne-Laure.
>
>
>
>
>
> On Monday, April 20, 2020 at 1:02:53 PM UTC+1, Jeremy Ruston wrote:
>>
>> Hi Tony 
>>
>> > On 20 Apr 2020, at 12:49, TonyM  wrote: 
>> > 
>> > The transclude text is transcluding the current tiddlers text which 
>> transcludes the current tiddlers text to infinity 
>>
>> TiddlyWiki does in fact have built-in protection against infinitely 
>> recursive transclusion loops. It doesn’t (yet) have such protections for 
>> recursive macros. 
>>
>> Best wishes 
>>
>> Jeremy. 
>>
>> > 
>> > Regards 
>> > Tony 
>> > 
>> > -- 
>> > 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 tiddl...@googlegroups.com. 
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/7c7564ed-369f-4062-8d94-d3015fad032e%40googlegroups.com.
>>  
>>
>>
>>
> -- 
> 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 tiddl...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/1fa406f3-9c31-4f73-98e2-6b737c0c7e85%40googlegroups.com
>  
> 
> .
>
>
>

-- 
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 
https://groups.google.com/d/msgid/tiddlywiki/50f7c90d-fcf6-4301-ac32-60b24b265d3c%40googlegroups.com.


Re: [tw5] Transclude tiddler body in tooltip

2020-04-20 Thread Jeremy Ruston
Hi Anne Laure

> I created a macro but $:/tags/Macro/View doesn't work - is it because I'm 
> using a clone of the core view template? 
> ($:/ness_labs/template/static-view-template)

That’s strange. Does your clone still include the line "\import 
[all[shadows+tiddlers]tag[$:/tags/Macro/View]!has[draft.of]]”?

> If so, which tag should I use to target it?

> It does work with just $:/tags/Macro but probably defeats the purpose.

It’ll only make a difference if you’ve got a significant number of links 
outside of the view template (e.g. in the sidebar).

Best wishes

Jeremy,


> 
> Many thanks!
> Anne-Laure.
> 
> 
> 
> 
> 
> On Monday, April 20, 2020 at 1:02:53 PM UTC+1, Jeremy Ruston wrote:
> Hi Tony 
> 
> > On 20 Apr 2020, at 12:49, TonyM > wrote: 
> > 
> > The transclude text is transcluding the current tiddlers text which 
> > transcludes the current tiddlers text to infinity 
> 
> TiddlyWiki does in fact have built-in protection against infinitely recursive 
> transclusion loops. It doesn’t (yet) have such protections for recursive 
> macros. 
> 
> Best wishes 
> 
> Jeremy. 
> 
> > 
> > Regards 
> > Tony 
> > 
> > -- 
> > 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 tiddl...@googlegroups.com <>. 
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/tiddlywiki/7c7564ed-369f-4062-8d94-d3015fad032e%40googlegroups.com
> >  
> > .
> >  
> 
> 
> -- 
> 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 
> https://groups.google.com/d/msgid/tiddlywiki/1fa406f3-9c31-4f73-98e2-6b737c0c7e85%40googlegroups.com
>  
> .

-- 
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 
https://groups.google.com/d/msgid/tiddlywiki/466B05F9-FDD1-48FA-925F-6DD6D72A449D%40gmail.com.


Re: [tw5] Transclude tiddler body in tooltip

2020-04-20 Thread Jeremy Ruston
Hi Tony

> On 20 Apr 2020, at 12:49, TonyM  wrote:
> 
> The transclude text is transcluding the current tiddlers text which 
> transcludes the current tiddlers text to infinity

TiddlyWiki does in fact have built-in protection against infinitely recursive 
transclusion loops. It doesn’t (yet) have such protections for recursive macros.

Best wishes

Jeremy.

> 
> Regards
> Tony
> 
> -- 
> 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 
> https://groups.google.com/d/msgid/tiddlywiki/7c7564ed-369f-4062-8d94-d3015fad032e%40googlegroups.com.

-- 
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 
https://groups.google.com/d/msgid/tiddlywiki/F7C23936-60D2-474C-B53A-BE85F8F140BE%40gmail.com.