---
title: "IframeApi Module"
canonical: https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.htm
archived: true
applies_to:
  - product: "Customer's Canvas On-Premises"
  - product: "Design Editor"
    versions: ["4.4.25", "4.x (may differ)"]
---

**You’re viewing outdated documentation.** [View the latest Customer’s Canvas On-Premises documentation](https://customerscanvas.com/docs/on-premises/).

# IframeApi Module

**Applies to:** Customer's Canvas On-Premises; Design Editor 4.4.25, 4.x (may differ) · **Archived documentation**
 
The Iframe Api module. It provides data and methods for a product handling.
 
## Modules
  
|  Name |  Description |
| --- | --- |
 |  [Configuration](https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.configuration.htm.md) |  The Customer's Canvas configuration. You can define these settings in the `~\Configuration\clientConfig.json` file. You can find an example of this file in [the corresponding topic](https://customerscanvas.com/docs/cc4/client-config.htm.md). You can also pass these settings into the [loadEditor](https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.loadeditor.htm.md) method as follows: |
 |  [ObjectModel](https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.objectmodel.htm.md) |  Object model of Customer's Canvas product. |
 |  [PostMessage](https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.postmessage.htm.md) |  This module carries out the [Events](https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.postmessage.events.htm.md) processing. |
 
## Classes
  
|  Name |  Description |
| --- | --- |
 |  [Editor](https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.editor.htm.md) |  Represents the web-to-print editor. |
 |  [RuntimeConfiguration](https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.runtimeconfiguration.htm.md) |  Allows you to get/set the user ID and PDF metadata at runtime. |
 
## Functions
  
|  Name |  Description |
| --- | --- |
 |  [loadEditor](https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.loadeditor.htm.md) |  Loads the web-to-print editor. |
 |  [loadEditorByQueryString](https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.loadeditorbyquerystring.htm.md) |  *Outdated, use [loadEditor](https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.loadeditor.htm.md) instead.* Loads the web-to-print editor through HTTP GET request. |
 |  [preload](https://customerscanvas.com/docs/cc4/customerscanvas.iframeapi.preload.htm.md) |  Preloads resources of the web-to-print editor. |
 
## Variables
 
### Let editorUrl
 
editorUrl: string

URL to your Customer's Canvas instance.
  
Typically, you do not have to specify this URL explicitly. If you add `id="CcIframeApiScript"` to the script tag which links the `IframeApi.js`, Customer's Canvas automatically detects this URL from the script source. However, if for any reasons you do not want to use the id in the script tag, you can use this property to specify the URL to the Customer's Canvas instance explicitly.
 
 - example
     - ```
<script> 
    CustomersCanvas = {
        IframeApi: {
            editorUrl: "http://example.com/" 
        }
    }; 
</script> 

<script type="text/javascript" src="http://example.com/Resources/SPEditor/Scripts/IFrame/IframeApi.js">
</script>

<script>
    //....
    var editor = null;
    CustomersCanvas.IframeApi.loadEditor(iframe, productDefinition)
        .then(function(e) {
            editor = e
        });
</script>
```
