Embedding P5 sketches into this site

To include a p5 sketch:

1. Upload the sketch.js file to Media Library.

2. While editing post, choose ‘Add Media’ and choose the uploaded JS file, it will add a link in your post.

3. Add class=’p5-embed’ to the link to specify it should be parsed as a p5 sketch. `<a href=’#’ class=’p5-embed’>your_filename</a>`

4. If you would like to specify the height and width of the frame of your sketch, use the data-height and data-width tags (you can specify one or both of these). `<a href=’#’ data-height=’400′ data-width=’600′ class=’p5-embed’>your_filename</a>`

5. By default the sketch and code are displayed. If you would like to hide the code, use the tag data-nocode=’true’. `<a href=’#’ data-nocode=’true’ class=’p5-embed’>your_filename</a>`

6. You can override the default font-size by adding data-fontsize=n, where n is the size of the font in pixels (for example, 10). Including media To include external files (for example, an image via loadImage) you will need to upload the files individually to wordpress and use the full blog url or the upload in the JS code.