Is it possible to display a canvas element inside of a post? I have been able to run some fairly simple Javascript but this Canvas element (and js files that go with it) are giving me grief...
It runs perfectly on my website when it is in just a simple HTML file:
<canvas class="canvas1" id="Houston1891" width="800" height="600">You need a browser with the HTML5 Canvas ability</canvas>
<script type="text/javascript">
var galaxy = new CanvasZoom( {
'canvas' : document.getElementById('Houston1891'),
'tilesFolder' : "folder",
'imageWidth' : 12709,
'imageHeight' : 5761,
'drawBorder' : true,
'defaultZoom' : 10,
'minZoom' : 10,
'maxZoom' : 14
} );
</script>
Along with the HTML above there are two .js files that are required. Both of these files are on the server and are referenced in the header.php.
I have tried just copying the above in to post (with proper HTML) - essentially just simulating my HTML page.
I have tried putting the above script in a .js file and converting it to a function that I then call using:
<script type="text/javascript">
<!--
validator();
//--></script>
And lastly, I have tried a small plug in then uses the custom fields option (I copy the above in to custom field then call it with <>)
Has anyone gotten a canvas element to work in a post? If so, can you please share where you placed your code and how you set up the post...
Thanks,
Greg
[No bumping, thank you.]