hh wrote:

> ... Or in case you meant simple HTML load (not canvas2d):
> 
> <img src="...">
> where src = "full http-path to image" (local server is running)
> or src = "relative path to image"

Actually I am not loading a file from a server, I am setting the htmltext of 
the widget.

The file I am loading is actually a markdown which I convert to xhtml using 
mergMarkdownToXHTML.
I then set the htmltext of the widget to this converted content.
Now the text etc all display fine as I would expect, however the images don't.
The image tags in the markdown are correctly converted to <img src="..."> but 
obviously the path to the image file is not being correctly interpreted by LC.
If I was to display this in a text field (by setting its htmltext) I would need 
to change the img tag's src attribute to include the "binfile:/" prefix.
When I do this the image displays as expected in the text field.

However, this displays the images at the size they exist on disk.

I notice the dictionary (which is using the browser widget) does not do this. 
It actually scales the images down where required.
So I thought rather than set the htmltext of the field, let me set the htmltext 
of a browser widget.
However none of the forms of the URL for the images that I have tried work.
I do not know javascript and while I can sort of follow the logic behind the 
guide display in the dictionary I can't fathom how it actually works.
It is taking the markdown, converting it the a form of html and it correctly 
shows the text and the images.
I am trying to do this without the javascript.


James





_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to