Working on a desktop app that allows users to create pages that will eventually be viewed on a mobile device. The pages are very simple html. I have a viewer (HTMLViewer) so users can preview their work. What I want to do is to allow users to add images. My problem is that I can’t get the image to show.
What I have done is created a temporary folder. I copy the text to the folder and then call viewer.loadPage(folderItem) with the folderItem that is the html text. The text shows up fine.
I have placed the image file (a .jpg) in the same folder, but all I see is the missing image picture.
Given I’m using the folderItem version of loadPage, the viewer should be able to get at the picture. No?
If the src is relative and the image is placed at the correct relative path, then yes it will work.
A great way to add simple HTML rich-text editing to your app is [url=http://htmledit.timi.me]HTML Edit[/url]
Try it out for free, it can even handle images being dropped on it :)
If I use the full path to the picture it works, but I want to use the simplest possible relative path. Both the html file and the image are in the same folder.
If they’re both in the same folder, shouldn’t work?
I’d advocate that everyone should use build folders & appropriate copy file steps.
That way you effectively get a “new” build of your app on each run so you can check that things work correctly from a fresh start.
It used to be that build automation was limited to certain license types but since it isn’t any longer there’s no reason not to use build automation and build folders