Here you can edit and run the code snippet from our documentation.
Example Code Snippet "PUT Request Example"
Result
'], {type: "text/html; charset=utf-8"});
iframe.src = URL.createObjectURL(blob);
updateIframeHeight();
}
let lastHeight = 0;
function updateIframeHeight() {
if (iframe.contentWindow.document.body) {
const currentHeight = iframe.contentWindow.document.body.offsetHeight + 50;
if (lastHeight !== currentHeight && (currentHeight - lastHeight) > 35) {
iframe.style.height = `${currentHeight}px`;
}
lastHeight = currentHeight;
}
}
render();
setInterval(updateIframeHeight, 500);
editor.on('change', function () {
render();
if (markedText) {
markedText.clear();
markedText = null;
}
});
}
window.getSessionInfo(function (sessionInfo) {
if (sessionInfo.authenticated && sessionInfo.tenantId) {
input.value = input.value.replace(ExampleTenantId, sessionInfo.tenantId);
input.value = input.value.replace('"demo"', `"${sessionInfo.tenantId}"`);
input.value = input.value.replace('\'demo\'', `"${sessionInfo.tenantId}"`);
if (sessionInfo.FC_CDN !== 'cdn.fastcomments.com') {
input.value = input.value.replace('https://cdn.fastcomments.com', sessionInfo.FC_CDN);
}
if (sessionInfo.FC_SITE !== 'fastcomments.com') {
input.value = input.value.replace('https://fastcomments.com', sessionInfo.FC_SITE);
}
setup(sessionInfo.userId);
} else {
setup(sessionInfo.userId);
}
}, function () {
setup(); // so we don't pass error as userId
});
})();