EmbedCode
Listing of Environments »EmbedCode[obj]
generates the code necessary to embed the object obj on a webpage.
EmbedCode[obj,"dest"]
generates code for an external environment or language of type "dest".
EmbedCode[obj,"dest",dir]
saves the generated code as files in the directory dir.
EmbedCode[obj,"dest",loc]
saves the generated code as a file archive in the file location loc.
Details and Options
- In EmbedCode[obj], the object obj can be a CloudObject and a URL that contains the URL of a cloud object.
- EmbedCode[obj] returns a string that can be inserted into the HTML of a webpage to embed obj on the page.
- In EmbedCode[obj,"dest"], the object obj can be a function with head APIFunction or FormFunction.
- Possible destinations for EmbedCode are given by the value of $EmbedCodeEnvironments.
- Destinations relevant to languages include "Java", "Python", "JavaScript", "CSharp", etc.
- In typical cases of external programming languages, EmbedCode returns an EmbeddingObject containing an Association giving a variety of elements necessary for the embedding.
- Typical options for EmbedCode include:
-
ExternalOptions < > options specific to each environment or language ExternalFunctionName Automatic name to use for generated external function ExternalTypeSignature Automatic rules specifying mappings to external types ImageSize Automatic size of embedded object in pixels Method Automatic embedding method to use Permissions Automatic permissions to set for the cloud object - With the default setting Permissions->Automatic, EmbedCode[obj] will preserve the permissions for a cloud object obj and will use permissions given by $Permissions if a new cloud object is created.
- With an explicit setting for Permissions, EmbedCode[obj] will effectively use SetOptions to change permissions of a cloud object obj.
Examples
open allclose allText
Wolfram Research (2014), EmbedCode, Wolfram Language function, https://reference.wolfram.com/language/ref/EmbedCode.html (updated 2016).
CMS
Wolfram Language. 2014. "EmbedCode." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/EmbedCode.html.
APA
Wolfram Language. (2014). EmbedCode. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/EmbedCode.html