[tw5] Re: [tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2018-07-02 Thread Martian
Finally! Great way to easily debugging and playing with JavaScript external libraries in TW5, instead of wrapping them each time into plugin On Thursday, 29 January 2015 23:12:01 UTC+3, Tobias Beer wrote: > > While having no plans of using this (yet), > however, seeing how that cat is out of the

Re: [tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2017-03-09 Thread Matt Groth
Hi Jeremy, It's interesting that you choose to restrict javascript usage to make it more safe to share content. Thanks for the explanation. Best, Matt On Sunday, March 5, 2017 at 3:25:01 PM UTC-5, Jeremy Ruston wrote: > > Hi Matt > > Just to add to the answers from others, > > I'm also somewha

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2017-03-09 Thread Matt Groth
This is perfect, thanks! On Sunday, March 5, 2017 at 7:07:12 AM UTC-5, BJ wrote: > > you could try an ifame in a normal tid > > http://www.reddit.com/.embed?limit=5"; > type="text/javascript">"""/> > > On Sunday, March 5, 2017 at 1:55:08 AM UTC+1, Matt Groth wrote: >> >> Got it to work! Thanks ag

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2017-03-07 Thread tejjyid
On Monday, 6 March 2017 22:23:58 UTC+11, PMario wrote: > > On Monday, March 6, 2017 at 11:20:58 AM UTC+1, tejjyid wrote: >> >> Edge cases >> > > There are 11 js macros in the core and 860 macro \define statements in the > UI and templates. ~200 of them are duplicated in the language editions

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2017-03-06 Thread PMario
On Monday, March 6, 2017 at 11:20:58 AM UTC+1, tejjyid wrote: > > Edge cases > There are 11 js macros in the core and 860 macro \define statements in the UI and templates. ~200 of them are duplicated in the language editions. So macros are all over in the core, and we only had 11 exceptions,

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2017-03-06 Thread tejjyid
Edge cases I can see that you might be able to do a lot with the wiki-text macros, but ... for anything complex they get pretty *unreadable pretty quickly! And it's not like they use a language you might use somewhere else. IMO, more, not less, use should be made of JS macros. I'm just abou

Re: [tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2017-03-05 Thread Jeremy Ruston
Hi Matt Just to add to the answers from others, > I'm also somewhat confused about why we have javascript macros then, and what > the difference is there. The objective of TiddlyWiki’s security restrictions is to make it possible to safely share content between users. That requires that JavaSc

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2017-03-05 Thread PMario
On Sunday, March 5, 2017 at 1:55:08 AM UTC+1, Matt Groth wrote: > I regularly backup my wiki so I'd be interested to know if this is at all > hackable. > TW sanitizes javascript within normal tiddlers, for security reasons. > I'm also somewhat confused about why we have javascript macros the

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2017-03-05 Thread BJ
you could try an ifame in a normal tid http://www.reddit.com/.embed?limit=5"; type="text/javascript">"""/> On Sunday, March 5, 2017 at 1:55:08 AM UTC+1, Matt Groth wrote: > > Got it to work! Thanks again, Ton. You're right, its not very practical in > the end. > > You can't put in any javascrip

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2017-03-04 Thread Jed Carty
I probably didn't say that very clearly, you can open a wiki and add javascript to it, but the javascript won't take affect until after the wiki has been saved and reloaded with the new content. And then it has to be either in a tiddler tagged with $:/tags/RawMarkup, inside a properly made java

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2017-03-04 Thread Matt Groth
Got it to work! Thanks again, Ton. You're right, its not very practical in the end. You can't put in any javascript after the wiki is loaded and have it take > effect for safety reasons. I regularly backup my wiki so I'd be interested to know if this is at all hackable. I'm also somewhat conf

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2017-03-04 Thread Ton Gerner
Hi Matt, It *does* work although not in a very practical way. You *cannot* test it at http://tiddlywiki.com/ since you need to save/reload. The tag $:/tags/RawMarkup let the script be put in the head section of TW; therefore it only works after save/reload. Thereafter the embedded 'reddit' wil

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2017-03-04 Thread Jed Carty
You have to save and reload the wiki after adding the tag. You can't put in any javascript after the wiki is loaded and have it take effect for safety reasons. -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and st

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2017-03-04 Thread Matt Groth
Hi Ton, Thank you, but I don't think the $:/tags/RawMarkup method works. I tried on both mine and tiddlywiki.com and tried both leaving the type blank and setting it to text/vnd.tiddlywiki. Also, I wasn't sure if you meant to do this with Tobias' plugin, but I tried that and it still didn't wo

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2017-03-01 Thread Ton Gerner
Hi Matt > > https://www.reddit.com/.embed?limit=5"; type="text/javascript" > > > > Create a tiddler, tagged with $:/tags/RawMarkup, with the above script in it. Do not set a type, or set the type to text/vnd.tiddlywiki (without type it defaults to that). The embedded 'reddit' will be shown

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2017-02-28 Thread Matt Groth
I'd like to insert some javascript into my tiddlywiki but I am having trouble. The script I want to insert is: https://www.reddit.com/.embed?limit=5"; type="text/javascript" > See it in use in JSFiddle It doesn't work if I set a tiddler type to "text

Re: [tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-02-06 Thread Jimmy Armand
Oh. nice solution. Will try this one too. Thanks! On Thursday, 29 January 2015 13:38:51 UTC-5, BJ wrote: > > you are looking for > > exports.htmlUnsafeElements = "script".split(","); > > but I think it would be better to include a couple of macros to switch > scripting on and off: > > create a t

Re: [tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-02-06 Thread Jimmy Armand
Thanks Will try this today On Thursday, 29 January 2015 15:12:01 UTC-5, Tobias Beer wrote: > > While having no plans of using this (yet), > however, seeing how that cat is out of the box anyhow, > here's a single *script* macro to toggle

Re: [tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-29 Thread Tobias Beer
While having no plans of using this (yet), however, seeing how that cat is out of the box anyhow, here's a single *script* macro to toggle

Re: [tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-29 Thread Tobias Beer
Hi BJ, did you test this or is it a hypothetical? Best wishes, Tobias. -- 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. T

Re: [tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-29 Thread BJ
you are looking for exports.htmlUnsafeElements = "script".split(","); but I think it would be better to include a couple of macros to switch scripting on and off: create a tiddler (any name will do) and set the type to "application/json" add field "module-type" with value "macro" and insert in

Re: [tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-29 Thread Jimmy Armand
Sorry but I'm not sure to understand what you mean. Is it that there's a parameter named script that will help me do what I want? Because in the config.js, there's no "script" configuration to be found. On Wednesday, 28 January 2015 19:12:02 UTC-5, Tobias Beer wrote: > > It's not hard to find. I

Re: [tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-29 Thread Jimmy Armand
That would be great. Thanks On Wednesday, 28 January 2015 11:25:39 UTC-5, Jeremy Ruston wrote: > > TiddlyWiki is designed to block JavaScript in wiki text content to make > sure that it is safe to share wiki text content. It's necessary so that we > can explore multi-user server configurations a

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-28 Thread Stephan Hradek
Please look further down the thread. The "encapsulated" javascript can access window.parent.$tw and its children. -- 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

Re: [tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-28 Thread Tobias Beer
> > It's not hard to find. If you search the source tree for "script" > (including quotes) you'll see this in *config.js*... > Thanks for the pointers. -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop rece

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-28 Thread Tobias Beer
Hi Stephan, > Go to tiddlywiki.com > Create a New Tiddler > Paste this into the tiddler: > > > alert("Hooray"); > > > Set the type to "text/html" > Yes, that will do things in an encapsulaed iframe, but not in the context of TiddlyWiki. Best wishes, Tobias. -- You received this message b

Re: [tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-28 Thread Jimmy Armand
It make sens. Thanks! On Wednesday, 28 January 2015 11:25:39 UTC-5, Jeremy Ruston wrote: > > TiddlyWiki is designed to block JavaScript in wiki text content to make > sure that it is safe to share wiki text content. It's necessary so that we > can explore multi-user server configurations and fed

Re: [tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-28 Thread Jeremy Ruston
TiddlyWiki is designed to block JavaScript in wiki text content to make sure that it is safe to share wiki text content. It's necessary so that we can explore multi-user server configurations and federation. If the act of viewing content authored by someone else causes executable JS code to run the

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-28 Thread Jimmy Armand
Yeah but I think that this method is not really nice since I want to put the javascript in a tiddler (text/vnd.tiddlywiki) On Wednesday, 28 January 2015 06:44:47 UTC-5, Stephan Hradek wrote: > > Go to tiddlywiki.com > > Create a New Tiddler > > Paste this into the tiddler: > > > alert("Hooray");

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-28 Thread Jimmy Armand
In fact what would be nice is to be able to import javascript directly in the tiddler, like we can do with the tags. With css it's easy: Create a tiddler put your css et voilà The same would have been nice (a major nice to have IMO) to have On Tuesday, 27 January 2015 14:43:24 UTC-5, PMario wr

Re: [tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-28 Thread Jeremy Ruston
Hi Stephan Good catch. It seems to depend on the browser: Firefox seems to allow the cross domain access, but Safari and Chrome do not allow it in my tests. I'll investigate whether adding the sandbox attribute improves things. Best wishes Jeremy. On Wed, Jan 28, 2015 at 1:32 PM, Stephan Hrade

Re: [tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-28 Thread Stephan Hradek
Am Mittwoch, 28. Januar 2015 12:49:27 UTC+1 schrieb Jeremy Ruston: > > > Note that script tags are allowed in text/html tiddlers because they are > safely sandboxed in an iframe. > I'm not sure, whether or not I understand "sandboxed" correctly. Please go to tiddlywiki.com Set a username Cre

Re: [tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-28 Thread Jeremy Ruston
Hi Tobi On Wed, Jan 28, 2015 at 2:00 AM, Tobias Beer wrote: > I never actually looked at the core to find what disables script tags. I'd > be curious to figure out how to enable them. Anyone wanting to mess with > your data would do the same thing. I prefer to know myself how that's done. > It'

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-28 Thread Stephan Hradek
Go to tiddlywiki.com Create a New Tiddler Paste this into the tiddler: alert("Hooray"); Set the type to "text/html" Finish editing Hooray! -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving em

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-27 Thread Tobias Beer
I never actually looked at the core to find what disables script tags. I'd be curious to figure out how to enable them. Anyone wanting to mess with your data would do the same thing. I prefer to know myself how that's done. Best wishes, Tobias. -- You received this message because you are subs

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-27 Thread PMario
Hi Jimmy, TiddlyWiki 5 doesn't use jQuery anymore. script tags in the tiddler source are not executed, due to security restrictions. The tw2/source tree is only there to test the TWclassic build procedure. Can you explain, what you want to achieve? -mario -- You received this message be

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-27 Thread Jimmy Armand
K. Thx. I will go with the Editable-Tables On Tuesday, 27 January 2015 09:52:53 UTC-5, Stephen Kimmel wrote: > > Jimmy, > > The $Macrocall is the main pathway to a complex javascript. When I did my > marathoning tiddler, I used a number of different ways of creating tables > using the $macrocall

[tw] Re: Simple Javascript insertion in tiddlers (text/vnd.tiddlywiki)

2015-01-27 Thread 'Stephen Kimmel' via TiddlyWiki
Jimmy, The $Macrocall is the main pathway to a complex javascript. When I did my marathoning tiddler, I used a number of different ways of creating tables using the $macrocall javascripts. One approach was to have each cell make the $macrocall passing the appropriate parameters to the javascrip