Charlie,

Whatever you wish but I feel I needed to clarify the innerwiki plugin can 
run on single file wikis and generate new single file wiki, like in an 
iframe., from where you can save it as a new single file wiki, if you 
wanted. Perhaps a good place to test.

Its purpose was for documentation snapshots which requires node, other 
applications of it do not need node.

Regards
Tones


On Monday, 16 August 2021 at 23:18:55 UTC+10 cj.v...@gmail.com wrote:

> Well, I'm more assuming than presuming that it is secure.
>
> Yup, template in my quick follow-up after initial post looks much nicer.
>
> Nah, I have not played with the Innerwiki plugin.  I largely prefer 
> single-file TiddlyWiki's, and Innerwiki seems to be for TiddlyWiki on 
> nodejs.  I'll try it sometime for giggles, but my goal here is the ability 
> to quickly add simple javascript needs with simple copy/paste  and without 
> javascript macros.
>
> I'm loving the speculation.  
>
>    - In particular:  TiddlyWiki as an editor for creating web pages 
>    (HTML, CSS, javascript)
>
>
> Be aware that the TiddlyWiki cannot see what is in the iFrame, and the 
> iFrame cannot see what is in the TiddlyWiki.
>
> *However and hypothetically*: the HTML fed to the iFrame can be dynamic 
> (i.e. the HTML created by TiddlyWiki, thus allowing TiddlyWiki to include 
> TiddlyWiki info in the HTML.  Interesting possibilities ...
>
>
>
>
>
> On Monday, August 16, 2021 at 1:21:58 AM UTC-3 TW Tones wrote:
>
>> Charlie,
>>
>> Thanks for this. 
>>
>>    - I presume it is secure because the iframe acts like a sandbox
>>    - The result will be what is displayed because there is no permitted 
>>    way to impact the wiki
>>
>> I wonder if 
>>
>>    - A template can be used rather than the variable? yes the following 
>>    worked
>>    <iframe srcdoc={{template}} style="border:none;width:100%;"></iframe>
>>    - Use a TiddlyWiki template for the content of the iframe may need to 
>>    wikify first.
>>
>> Have you played with the* innerwiki plugin* it's similar but different? 
>> It can pass a lot more data to the iframe (I think), in fact can build a 
>> whole wiki inside the iframe.
>>
>> Speculation;
>>
>>    - Could this be used by students of javascript?
>>    - what kind of Javascript code can be implemented this way?
>>    - Could it access functions defined in the parent wiki eg raw tags?
>>       - I suppose it could if added to the template.
>>    - Could we use iframes in which to publish complete html pages 
>>    including javascript as a website development or learning tool.
>>
>> Regards
>> Tones
>>
>> On Monday, 16 August 2021 at 12:39:05 UTC+10 cj.v...@gmail.com wrote:
>>
>>> Better to keep the HTML readable, drag the attached json with two 
>>> tiddlers into some TiddlyWiki:
>>>
>>> On Sunday, August 15, 2021 at 11:27:41 PM UTC-3 Charlie Veniot wrote:
>>>
>>>> I don't know what made me think of this.
>>>>
>>>> In case this has not been brought up in a while (I doubt this is new to 
>>>> seasoned folk) ...
>>>>
>>>> I was thinking: could I use an iFrame to include simple javascript in a 
>>>> tiddler without getting into macros or plugins that enable javascript.
>>>>
>>>> And, if I could, then could I set things up so that the iFrame is 
>>>> showing javascript dynamically created by the tiddler ?
>>>>
>>>> So here is a way to show a digital clock in TiddlyWiki, for 
>>>> non-programmers who just want to copy and paste javascript code from the 
>>>> web without figuring out how the javascript code works :
>>>>
>>>> Put this in a brand new tiddler:
>>>>
>>>> *<$vars* *vSrcDoc*={{{ [[<body>  <div id="clockDiv"></div>  <script>  
>>>>   let clockEl = document.getElementById("clockDiv");    function 
>>>> getClockTime() {      let date = new Date();      let hr = 
>>>> date.getHours();      let min = date.getMinutes();      let sec = 
>>>> date.getSeconds();      hr = ("0" + hr).slice(-2);      min = ("0" + 
>>>> min).slice(-2);      sec = ("0" + sec).slice(-2);      clockEl.innerHTML = 
>>>> `${hr}:${min}:${sec}`;    }    setInterval(getClockTime, 1000);  
>>>> </script></body>]] }}}*>*
>>>> *<iframe* srcdoc=*<<vSrcDoc>>* style="border:none;width:100%;"
>>>> *></iframe>*
>>>> *</$vars>*
>>>>
>>>> Sneaky sneaky, has me wondering what kind of other fun things could be 
>>>> done...
>>>>
>>>

-- 
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/bb8a5d48-341e-4637-9ed4-10b49c71f146n%40googlegroups.com.

Reply via email to