Closed egekorkan closed 1 year ago
When sharing a TD via the TD Playground and using the compressed string as input for the ediTDor I always end up with a "tdjson" prefix. @egekorkan do you know why that's the case? It seems to me that the Playground does some extra steps when compressing and decompressing a TD/TM via lz-string.
That is added since we have a single way to share TDs and TMs and we use this to distinguish whether the intention is to create a TD or TM. As to why finding a TM or TD is not automatic in playground, see https://github.com/thingweb/thingweb-playground/issues/223
Okay so for the time being I think we should do the same thing. Do you agree with that @egekorkan?
Okay so for the time being I think we should do the same thing. Do you agree with that @egekorkan?
Sorry for the late reply. I think that editdor also never tries to guess whether there is a TD or TM, so the same approach works.
With @fexpal we have discussed the posibility to transfer TDs from Editdor to Playground and vice versa. TD Links in Playground are generated via https://www.npmjs.com/package/lz-string (also see https://github.com/thingweb/thingweb-playground/pull/359) which has some advantages to usual URL encoding. A button can be placed that simply does the same encoding to the TD in the JSON Editor part and open a new tab with playground in it for future tests on the TD.
It might be also worthwhile to use the same compression here but we can do a more objective comparison first.