EmbeddedXopus.getAPI
Description
getAPI() can be used to gain access to the SDL LiveContent Create API from outside an <iframe>, without using EmbeddedXopus.addListener. It requires the frame to have a name attribute defined, which is supplied as the only argument of this method.
<script src="/xopus/embedded.js"></script>
<script>
function load(uri) {
EmbeddedXopus.getAPI('xopus').Editor.loadDocument(uri);
}
</script>
<iframe src="/xopus/xopus.html#/start.html" name="xopus"></iframe>
<button onclick="load('a.xml')">a.xml</button>
Syntax
EmbeddedXopus .getAPI (windowName : String) : Editor
Arguments
- windowName
-
String. The name of the SDL LiveContent Create<iframe>window.
Return Value
Editor . The global object that represents the Xopus editor.