Happy Saturday, cj.v!

I've read your preceding post several times and I remain unsure which way 
you are leaning on "sql.jg".

Can you clarify?


Cheers,
Hans


On Saturday, May 1, 2021 at 9:13:47 AM UTC-4 [email protected] wrote:

> G'day Jeremy, and thank-you !
>
> I have sql.js <https://sql.js.org/#/> on the brain, and am not quite sure 
> I really want to even dip a toe into that kind of self-inflicted pain.
>
> Although I was in a soul-searching "should I shouldn't I, could I couldn't 
> I, to be not to be" stretch of waffling over it, I'm pretty sure I've 
> entered an "oh hell no" quick retreat to the safety of a thumb-sucking 
> fetal position.
>
> My loathing of javascript makes it kind of hopeless for this kid.  For all 
> of the great things that can be done with it, as much as I am impressed 
> with capabilities and end products, the language irritates the living 
> daylights out of me.
>
> Silly me: I may have been thinking "throw a wildly interesting project at 
> it, and maybe it will grow on you?"  Not so much.
>
> Thank goodness for the slew of folk with brains wired to work with 
> javascript !
>
>
>
>
> On Saturday, May 1, 2021 at 6:27:33 AM UTC-3 [email protected] wrote:
>
>> I'm not having much luck searching the web, and I'm hoping somebody can 
>> put me on some kind of "for white belts" reading material.
>>
>> Say one finds a small javascript library one wants to use with 
>> TiddlyWiki, what are the options and the processes involved?
>>
>> Does one include the libary (if so where?) in TiddlyWiki, then access the 
>> libary functions via javascript macros ?
>>
>> Total newb here with the whole concept, and not particularly 
>> knowledgeable about javascript, so please be gentle !
>>
>>
>> It depends what the JS library does.
>>
>> If the library does pure text manipulation (eg an anagram engine), then 
>> it should be fairly easy to wrap it up into a JavaScript macro. There are 
>> some examples here:
>>
>> https://github.com/Jermolene/TiddlyWiki5/tree/master/core/modules/macros
>>
>> If the library converts markup to HTML, then it can be wrapped to be a 
>> parser - see the Markdown parser or the KaTeX parser for an example:
>>
>>
>> https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/katex/latex-parser.js
>>
>> https://github.com/Jermolene/TiddlyWiki5/blob/master/plugins/tiddlywiki/markdown/wrapper.js
>>
>> Things get much trickier if the library manipulates the DOM. One 
>> fundamental problem is that many libraries are written on the assumption 
>> that they will be used on a static page, and don’t automatically cater for 
>> dynamic content. In many cases, such libraries are old jQuery libraries 
>> that do things that can now be done with plain HTML or wikitext.
>>
>> The simplest case is a library that produces output in a single DOM node. 
>> These can generally be turned into a widget. For example, the CodeMirror 
>> widget:
>>
>>
>> https://github.com/Jermolene/TiddlyWiki5/tree/master/plugins/tiddlywiki/codemirror
>>
>> That is not an exhaustive list, what kind of library are you looking at?
>>
>> Best wishes
>>
>> Jeremy
>>
>

-- 
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/83ad6d61-615e-4a20-9323-0fdf8d8f8b8bn%40googlegroups.com.

Reply via email to