@SugarRay I don’t know of anything in Codea that does that, but if you specify “false” in the openUrl command, it opens the url in an external browser. If you can find a browser that shows the data maybe you can use that.
What is the .path used for at the end of asset.documents.index.path?
I would have thought my Codea’s file syntax that it would have just been:
openURL("file://"..asset.documents.index, true)
I tried opening up a file in my Codea documents directory just like your example (a simple .html file named ‘index.html’), and wouldn’t open (no error, no browser opening). Yet, using openURL to open up an external web page works just fine.
You need to use .path on the end of the asset key to turn it into an absolute string version of the file path, this is needed when constructing a file:// URL to give to the web browser
This is actually in the documentation under Graphics → assets and Graphics → Using Assets, though not the explicit case of using openURL with them
I was able to open a browser to a local file named index.html by using the syntax I showed above (with the .path property to get the actual asset path string)