Hi Yanshu,
congrats with the new prototype! I'm getting an empty iframe on your demo page, though.
That's an interesting approach that you've come up with (passing macros to render to TW5 through the url hash), it's more flexible indeed (I thought about just editing TW5 and using an iframe with a permalink to a specific tiddler), and looks promising. It is limited about the storage and interaction (doesn't allow to save data from the TW5 to TWC, for instance if you use some kind of date-time picker etc; if you need to store the edits permanently, whether this works depends on savers), but that's possible to overcome in some scenarios: you can try using localStorage, or interact with iframe to get data from it (should probably be possible since they are on the same domain and normally both local).
A small suggestion to simplify the code: you can use
JSON.stringify
and
JSON.parse
to convert JS objects to JSON and back, without concatenating all those ",\n", "]", and other bits.
Thanks for sharing, this indeed gives quite a room of possibilities, maybe it's time to check how well TW5 plugins are indexed and if there are some helpful ones!
Best regards,
Yakov