Problem:
A ViFrame chart renders HTML text, which may include <IMG> tags to display images.
When a ViFrame chart is created using the default settings, if the HTML text contains an IMG tag, that image will not show up if the code is running in an AIR application. This due to a security measure that the Flex documentation states is needed to thwart phishing attacks.
Issue:
This issue has been known for quite a while, actually. It was first noticed a few years ago in either the Android or iPad app, both of which are AIR applications. Because the desktop app is also an AIR app, the problem also exists there. And although there is no practical way to fix it completely, there is a workaround that I implemented.
Resolution:
1. On the ViFrame Settings panel in the chart designer, check the box in the “Text Settings” section labeled “Advanced Text Rendering”.
2. In the HTML Template editor dialog, there is a new checkbox on the HTML tab labeled “Preserve Raw HTML.” This should be checked. Checking it makes the GUI tab disappear.
3. The HTML text must be edited by hand. The GUI editor cannot be used. The “Preserve Raw HTML” checkbox should remain checked until the dialog is dismissed with the OK button. The appearance of the rendered HTML should be checked in the chart itself, since it cannot be checked in the GUI editor.
When the above steps are followed, the image embedded in the ViFrame should appear the Flash client, the desktop app, and the HTML5 client. (And future releases of the Android and iPad aps.) The overall appearance of the rendered HTML may be slightly different in the HTML5 client.
It should be noted the workaround may work if steps #2 and #3 above are skipped, however the rendered HTML may look considerably different (particularly the way text wraps around images) in the chart than it does in the GUI editor. Plus, since the GUI editor, by necessity, uses the control with the security restriction, if you are editing in the desktop app an image won’t show up in the GUI editor.
Comments
0 comments
Article is closed for comments.