@pmario OP uses the same JavaScript library (turndown) to achieve the HTML 
to markdown/wikitext conversion as my demo posted above.

Turndown by default converts to Markdown, but it is relatively simple to 
override or add new rules for wikitext. It would indeed be nice to 
collaborate on getting a complete set or rules for all supported wikitext 
syntax.

For an example 
see 
https://saqimtiaz.github.io/sq-tw/typewriter.html#%24%3A%2Fplugins%2Fsq%2Ftypewriter%2Flib%2Fturndown-browser-umd.js
 
and addtional rules defined 
in 
https://saqimtiaz.github.io/sq-tw/typewriter.html#%24%3A%2Fplugins%2Fsq%2Ftypewriter%2Fengine.js

This particular demo escapes HTML entered into the editor as part of a 
round trip conversion process. If that escaping was turned off, it would 
save HTML pasted into the editor as wikitext.

Hope this helps while we wait to hear back from the OP :)

On Saturday, March 27, 2021 at 1:03:31 PM UTC+1 PMario wrote:

> On Friday, March 26, 2021 at 11:35:36 AM UTC+1 Saq Imtiaz wrote:
>
>> @pmario I could be wrong, but I am guessing this is a standalone tool and 
>> not something integrated into TiddlyWiki and the editor mechanism.
>
>
> Yea, ... Non the less it would be killer to throw some HTML content into 
> left side and get TW text on the right side. ... right?
>  
>
>> See the original Turndown demo: https://domchristie.github.io/turndown/
>>
>> I'll be very pleased if I am wrong about that though :)
>>
>
> Saq. As far as I can see in your link to the github repo. It only contains 
> HTML and Javascript. ... I'm interested in the code, that does the 
> conversion. ... As long as it's javascript it can be included into TW. 
>
> I hope the code in the OP-repo is JS too. ... If not, it stays in a SPA 
> ... that's also OK.
>
> Just my thoughts.
> -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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/726706e4-a3c5-46eb-990d-dca2624d58d5n%40googlegroups.com.

Reply via email to