I'm using postMessage API to post a save command to my Zoho writer iframe. Following the docs I have this
XDC.setTarget({
"origin": "https://api.office-integrator.com",
"window": document.getElementById("zoho-writer").contentWindow
});
XDC.postMessage({
"message": "SaveDocument",
"data": {
"hideSaveButton": true, // Default value will be true
"forceSave": true, // Default value will be true
"saveUrlParams": JSON.stringify({ apikey: "<my key>" }),
"format": "docx"
},
// Use "SaveDocumentResponse" event for oncomplete
"onexception": function(data) {
var x = 1;
},
"oncomplete": function (data) {
var x = 1;
}
} );
I'm just guessing on the saveUrlParams because they don't explain that other then to say it is some JSON. Whenever I run this I get the onexception response with code 1108 and a message of Domain not registered. I have gone in to my Zoho account - the White Labeling - Security Controls - PostMessage domain and added my domain.
Any thoughts?