HTML Webpage for Coda Embed

Warning! I am not a web developer and have very little knowledge on the matter.

Got no help from codans and I figured it out myself so I decided to share with simillar fellow users who would like to embed a coda doc into HTML on a webserver.

I am sure the community has lots of web devs so they could contribute to this hack.

NOTES:

  1. Since Coda is not supported on IE and Edge, I added a very simple script for browser check and redirecting to a webpage.
  2. Replace XXXXXXXX below with your own embed link. Not the whole of it but just the link to the document. You’ll figure it out :slight_smile:
  3. Remove all double ## from the code below

<##html>
<##head>
<##style type=“text/css”>
.frame {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
opacity: 1;
display: block;
width: 99.5%;
height: 100%;
<##/style>

<script type="text/javascript">
if (/MSIE 10/i.test(navigator.userAgent)) {
   // This is internet explorer 10
    window.location = "https://10years.theimind.com/";
}

if (/MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent)) {
    // This is internet explorer 9 or 11
    window.location = "https://10years.theimind.com/";
}

if (/Edge\/\d./i.test(navigator.userAgent)){
   // This is Microsoft Edge
    window.location = "https://10years.theimind.com/";
}
else
{
// Not EI or Edge, do nothing
}
</script>
</head>
<body><p><iframe allow="fullscreen" class="frame" src="https://coda.io/embed/XXXXXXXX?viewMode=embedplay&amp;hideSections=true" style="margin-top:-90px;"></iframe></p></body></html>
2 Likes

Great concept - can you post an example to see what it would be like before setting it all up?

How to and where use this code ?

You would need to create a simple index.html file with this code inside copy-paste and then follow the notes above. The resulting HTML would have to go on your webserver hosting. Please let me know if not yet clear.

2 Likes

Got it ! Thanks. Thanks.

1 Like

Sent you a personal message with a sample. Hope it helps.