Hypothetically, if I were to try to learn how to build a plug-in for Obsidian that let you write a p5 sketch and have it automatically render to a canvas element, where would I start?
What resources would be helpful to know about?
Hypothetically, if I were to try to learn how to build a plug-in for Obsidian that let you write a p5 sketch and have it automatically render to a canvas element, where would I start?
What resources would be helpful to know about?
first, just build yourself a plugin. Build a plugin - Developer Documentation
This plugin seems to be about P5: GitHub - capogreco/obsidian-canvas-api: p5 sketches in obsidian
Another thread in the forum: Rendering p5.js in Obsidian/javascript not running in Obsidian extension
Did you find a working solution for this? ![]()
I also wanted a way to make a collection of sketches with notes, I discovered Obsidian and I’ve decided to write this https://github.com/luckasRanarison/obsidian-p5js (I’m a new user so I can’t post links yet). It’s pretty basic, what’s really missing is syntax highlighting which got removed because of the custom p5 tag, syntax highlighting in edit mode for the code blocks is undocumented, but it seems to use Code Mirror. I’ll take a closer look and try to improve this late in the week, but this is a good start I guess.