Somewhere, lost in this forum, I made such a cleaner/converter that works with BJ's tiddlyclip. It uses regular expression to do a usually-but-not-always successful clean up. It uses JS, so purists may not like it.
A more ambitious approach would be to load the HTML into it's own DOM tree, find and parse the elements, and convert to TW text. Also in the forum is something we did (I believe you helped) with pandoc. For tasks like these, it would be handy if TW spoke markdown natively. There are already libraries and tools for HTML-to-markdown. On Monday, October 14, 2019 at 2:41:51 AM UTC-7, @TiddlyTweeter wrote: > > bimlas > > https://html-cleaner.com/ > <https://www.google.com/url?q=https%3A%2F%2Fhtml-cleaner.com%2F&sa=D&sntz=1&usg=AFQjCNEP74kld8-w4No2ohdB_D45-ygRQg> > > Nice tool. Useful. > > FWIW, it should be possible to make a tool in TW to do that. Plus > optionally convert HTML to WikiText. > > When I get time I'll make a protoype. > Also there has been some work (I can't find it at the moment that does > conversion, & I think somone did it for WikiPedia pages?) > > Best wishes > TT > > On Monday, 14 October 2019 10:38:02 UTC+2, bimlas wrote: >> >> Dear all, >> >> When you copy text from a web page and paste it into the wiki, it usually >> appears in the style of the web page (for example, it has a white >> background or appears in a different font). >> >> I just found an online tool that makes it easier to import HTML texts >> into TiddlyWiki: Select and copy the desired section from a web page, paste >> it into this tool and press the "Clean HTML" button to delete the >> unnecessary parts (inline style, classes). You can paste the stripped text >> into the wiki without any problems, and it will have the same appearance as >> other tiddlers. >> >> Different options can be set for what to delete. >> >> https://html-cleaner.com/ >> >> It is also possible to delete all HTML markup. >> >> https://html-cleaner.com/features/remove-html-tags/ >> > -- 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/5ca0b218-c736-468e-a3fa-fefe4b64fe4b%40googlegroups.com.

