postMessage API List

The postMessage APIs are broadly divided into major categories:

Note: To enable postMessage APIs, you need to register your domain(s) with us. Please refer this link to know how to allow or add your postMessage domain list.

Send Messages to Show iFrame

Under the send message section, you can post content, export and save spreadsheets from your host page.

The list of send message methods and their categories are tabulated below:

Content

Document

Content

Find and Replace

Purpose

To find a text and replace it with another text from your web application's host page to Zoho Show iFrame.


XDC.postMessage ( {
        "message": "FindAndReplace",
        "data": {
            "findText": <String>,
            "replaceWith": <String>,
            "matchCase:<Boolean>,
            "isReplaceAll": <Boolean>
        },
        "oncomplete": function(data) {
                    // Handle Success
                },
       "onexception": function(data){
            // Handle exception
       }

} );

 

Document

Export Presentation

Purpose

To download the Show document.


XDC.postMessage ( {
        "message": "ExportShowPresentation",
        "data": {
            "format": <String> // zslides/pptx/pps/ppsx/odp/sxi      
        },
        "oncomplete": function(data) {
                    // Handle Success
                },       
       "onexception": function(data) {
            // Handle exception
       }
} );

 

Save Presentation

Purpose

To save the Show document.


XDC.postMessage ( {
        "message": "SaveShowPresentation",

         "oncomplete" :  function(data) {
               console.log('oncomplete');
               },
        "onexception": function(data) {
              console.log('onexception');
        }
} );

 

Receive Messages from Show iFrame

Under the receive message section, you can obtain multiple notifications about the presentation status from Show iFrame to your host page. 

The list of receive message methods and their categories are tabulated below:

Document

Document

Presentation Load In Progress

Purpose 

To receive the "Presentation Load In Progress" notification from Show iFrame to the host page.  


XDC.receiveMessage("ShowPresentationLoading", function(data) {
        console.log('OnShowPresentationLoading');
} );

 

Presentation Load Complete

Purpose 

To receive the "Presentation Load Complete" notification from Show iFrame to the host page.  


XDC.receiveMessage("ShowPresentationLoaded", function(data) {
         console.log('OnShowPresentationLoaded');
} );