Create an EmbedCode
to use in an HTML page as in the following:
EmbedCode[
CloudDeploy[
Manipulate[
Plot3D[Cos[x y \[Delta]] (\[Delta] + x y), {x, -6, 6}, {y, -6, 6}],
{{\[Delta], 0}, -2, 2}], Permissions -> "Public"],
ImageSize -> {500, 500}]
(Note that EmbedCode
has a bug -- which is a known bug -- in that it does not generate an iframe
code with a closing
</iframe>
tag, so one has to remember to add that)
Now place this iframe script in an HTML page. For example here is an example HTML page's code for this where you will need to add the appropriate URL for the cloud object generated above replacing the https://www.wolframcloud.com/objects/XXXXX
below:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Test CloudDeploy Manipulate Embedding</title>
</head>
<body>
<h2>A Start</h2>
<p>This is a bit of text before the embedding code. </p>
<iframe src="https://www.wolframcloud.com/objects/XXXXX?_embed=iframe" width="500" height="500" > </iframe>
<p>And following is this bit of text.</p>
</body>
</html>
I find that most of the time when I create this web page and open it in a browser, the Manipulate first appears in the iframe and then a small popup appears saying that the session has expired before one can do any computation--it is then replaced with the Wolfram Cloud login page.
However the URL in the script (the https://www.wolframcloud.com/objects/XXXXX
) works fine if it is simply used alone in a browser.
Also, as an aside, the iframe contains Wolfram branding on the bottom. Is there any way to get rid of this? It's quite inappropriate in any document that I would want to place on the web.