1
$\begingroup$

I am trying to display a webpage as an iframe in Mathematica.

The only option I have found is with EmbededHTML, but I can't get it to work for me. Example:

EmbeddedHTML[
  "<img src=\"http://xahlee.info/comp/Mathematica_logo/Mathematica_8_logo.png\">"
]
$\endgroup$
  • $\begingroup$ EmbeddedHTML is a structure used for cloud documents. On the desktop there is no support for embedding a webpage as would be done in a browser. If you just want the image you linked you can download it with Import. $\endgroup$ – b3m2a1 Mar 8 '18 at 22:59
2
$\begingroup$

Shortly - not in Mathematica

In desktop Mathematica there isn't any built-in way to display an embedded web page.

Wolfram Cloud notebooks support EmbeddedHTML and your example will work just fine as this is ultimately handled by the browser.

EmbeddedHTML will preserve the content as raw html instead of showing a string output in your deployed page or in a cloud notebook. Then the browser can take care about fetching img's src.

Workarounds in Mathematica

You can fetch it as XML and provide a custom typesetting.

Or you can try to use tools for e.g. web screen shots: Web Browser Screen Shot

In your case where the source is a .png file, just import it. If you don't want to store it you can use this: How to place an image inside a notebook, with the minimum memory footprint?\

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.