j2html icon indicating copy to clipboard operation
j2html copied to clipboard

Parse html to j2html tool

Open ijabz opened this issue 7 years ago • 4 comments

An idea, in many cases I can imagine people retrofitting their code to use j2html rather than their previous method. I have html created without j2html, it would be great if i could pass some rendered html which would then generate the j2html java code needed to create it from j2html instead.

ijabz avatar Jun 30 '18 07:06 ijabz

Yes, this is the reason it's a bad fit for bootstrap, since you need to convert a lot of html to j2html. There was an issue for creating a conversion tool a few years back, but no one seemed interested in working on it.

tipsy avatar Jun 30 '18 08:06 tipsy

This might be helpful: https://github.com/ArthurClemens/mithril-template-converter/tree/master/packages/mithril-template-builder

Live demo: http://arthurclemens.github.io/mithril-template-converter/index.html

tipsy avatar Jul 08 '18 14:07 tipsy

I came up with this, this evening. It's very basic but functional. Posting here in case it is useful to others: https://github.com/rupert654/j2html-generator

rupert-madden-abbott avatar Aug 19 '18 00:08 rupert-madden-abbott

Nice work rupert! It would be nice to have a JavaScript version that could be run in the browser, but I suppose I could create a web service for it.

tipsy avatar Aug 19 '18 08:08 tipsy