I have some small HTML files (containing interactive data visualizations made in R/Python). They can't be published online but I thought I could upload them to Sharepoint/Teams and preview them in the HTML File Viewer to share with my colleagues.
Unfortunately, none of the files can be previewed as the JavaScript does not run. Is this the intended behavior of html file preview
in Teams and Sharepoint?
As an example, the HTML file below produces the following preview in both Teams and Sharepoint.
Is there a way to default this file to Open in Browser
rather than preview
? or make it so the JavaScript does run?
<!DOCTYPE html>
<html>
<body>
<p id="demo">Javascript is not working</p>
<script>
document.getElementById("demo").innerHTML = "Hello JavaScript!";
</script>
</body>
</html>