So, I still wanted to have some JS within (some) tiddlers to my. So I just 
went with a "workaround": I added a marker (let's say ZZZZ) and then in my 
tiddlers I can add <ZZZZscript> </ZZZZscript> ZZZZonscript=... and that 
won't be stripped. Then, I just added a simple 'sed' one-liner in my build 
script to remove the ZZZZ marker from html files in TW's output directory. 
This is an ugly workaround, but it works without trying to go change TW 
rendering process.

On Tuesday, March 23, 2021 at 10:51:07 AM UTC+2 [email protected] wrote:

> Hi Florian
>
> There's no easy way around that limitation of the default static site 
> rendering templates. You may find the easiest approach is to give your 
> buttons CSS classes or IDs for identification, and then use a separate JS 
> file to trap events at the document level, or to set up event handlers 
> after the page has loaded.
>
> Best wishes
>
> Jeremy
>
> --
> Jeremy Ruston
> [email protected]
> https://jermolene.com
>
> On 22 Mar 2021, at 22:04, Florian Cauvin <[email protected]> wrote:
>
> 
>
> I use tiddlywiki to render a set of static html pages!
> In a tiddler, I'm adding some html <button> tags with some very simple 
> "onclick=..." in order to provide some small basic interactivity to this 
> static site. But TW rendering strips all the onclick stuff from the 
> rendered html. How could I force TW not to remove my "onclick" ?
>
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/8820f22e-e5c3-4aec-8bbf-0d380e025980n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/8820f22e-e5c3-4aec-8bbf-0d380e025980n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/65f6f0b7-089d-4b23-8156-763c0ed01893n%40googlegroups.com.

Reply via email to