top of page

Embed a JavaScript Canvas without CodePen

Ok, my original goal here was to see if I can get my canvas to be the background of this blog you can see I didn't quite reach that goal. What I was able to do is draw a canvas directly into the blog editor rather than having a link to my CodePen canvas. All I needed to do was insert an html element into my blog post and then include the link to the js library that I used (p5.js) and copy and paste in my code. Everything works. I really don't want to copy and paste the code in. It's not very efficient and as I edit and make updates to the code I have to keep copying and pasting it in from my editor. I'd really want to at least reference the js code written in the editor in CodePen so that when changes are made I can see them live in the blog. For now, what I have here is a step forward and maybe in the future I can link to the code housed somewhere else.

bottom of page