When using an embedded interface in an external site where you do not control the style source (CSS), the styling on the site gets modified and causes undesirable behavior.
Users may experience one or more of the following symptoms using SharePoint specifically:
Other sites may cause different, undesirable behavior.
The site hosting the embedded interface is not properly isolating the input HTML/JS/CSS.
Isolate the embedded interface by wrapping the HTML/JS/CSS in an iframe.
An example of an iframe is as follows:
<pre> <!DOCTYPE html> <html> <head> <script> function render() { var scriptFrame = document.createElement('iframe'); scriptFrame.id = "embedded-iframe"; scriptFrame.src = 'javascript:""'; scriptFrame.style.width = "100%"; scriptFrame.style.height = "750px"; content.appendChild(scriptFrame); frameDoc = scriptFrame.contentDocument; if (!frameDoc) { frameDoc = scriptFrame.contentWindow.document; } var html = '<html>\n<head></head>\n<body style='height: 725px;'>\n<script src='YOUR_APPIAN_URL/suite/tempo/tempo.nocache.js'' + '></scrip' + 't>\n<appian-task taskId='PUT_YOUR_APPIAN_TASK_ID_HERE' />\n</body></html>'; frameDoc.open(); frameDoc.write(html); frameDoc.close(); } </script> </head> <body> <div id='content' style='max-width: 1200px;' /> <script> render(); </script> </body> </html>
Note: The height of the iframe needs to be static. You can change the size in scriptFrame.style.height and in the HTML variable. The value in the HTML variable needs to be smaller than what is specified for scriptFrame.style.height.
scriptFrame.style.height
This article applies to all versions of Appian.
Last Reviewed: February 2017