Thank you Mark!
I actually do most the job with the current TW5 features and it is amazing 
in preparing semantic content.

Cheers
Mohammad



On Thursday, July 5, 2018 at 7:24:41 PM UTC+4:30, Mark S. wrote:
>
> Well, it can be used to write your own widgets, which I found really 
> complicated and confusing, and not well-documented.
>
> It's easier  to write your own javascript Macros or Filters. The easiest 
> way to do that is to find a simple one (like the "now" macro) , clone it, 
> and then modify it to use your own js code. The problem is that you will 
> need various TW functions to get variable values, fields, etc. and you will 
> probably have to go spelunking in the code to figure out what they are 
> because they're not documented (if they are documented, it would be great 
> to know where).
>
> Coding was much easier in TWC. You could use jquery which was designed 
> from the bottom up to be easy for coding. There's oceans of existing code 
> out there that could be easily modified and plugged in. With TW5, not so 
> much. I'm not sure what was gained by giving TW5 it's own tree, since the 
> DOM based approach obviously worked in TWC.
>
> -- Mark
>
>
>
> On Thursday, July 5, 2018 at 4:34:51 AM UTC-7, Mohammad wrote:
>>
>> Hello Mario,
>>
>>  Thank you for your reply!
>> I was playing with JavaScript and was curious to see how can I add JS 
>> code to Tiddlywiki.
>> I understood JS code are not allowed to directly interact with the DOM 
>> objects!
>>
>> I appreciate if you introduce me some simple cases (tutorial) for 
>> learning how JS code can be included in TW.
>>
>>
>> /Mohammad
>>
>>
>>
>> On Thursday, July 5, 2018 at 1:47:57 PM UTC+4:30, PMario wrote:
>>>
>>> Hi Mohammad, 
>>>
>>> In short: No. 
>>>
>>> I think it would be easier, if you describe, what you want to achive. So 
>>> we may have a solution, or could provide help. 
>>>
>>>
>>> more details: 
>>>
>>> Your code directly manipulates the "redered output" in the DOM and also 
>>> keeps program state in the DOM. This is similar to what jQuery did some 
>>> years ago. That's not the concept used by TW. 
>>>
>>> TiddlyWiki is built with a completely different concept in mind. Every 
>>> time the tiddler store is changed, the output (DOM) is automatically 
>>> rewritten by the core, if needed. So your program can and will be destroied 
>>> at any time. 
>>>
>>> TiddlyWiki uses widgets to create and manipulate the rendered output. 
>>>
>>> have fun!
>>> mario
>>>
>>>

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f2674431-269f-42c2-a424-000bd36caa7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to