I am trying to create a plugin which uses circuitjs to render and edit circuits within Obsidian.
The way you typically interact with circuitjs is by loading it in an iframe then interacting with it through javascript. See
I don’t want to use the external website as the iframe src as it means I wouldn’t be able to access it offline or modify the internal CSS of the iframe.
Instead I wanted to embed it in my plugin.
Things I have tried
- Setting
iframesrcdoc to the html string (fails as it makes network requests to get the js) - Changing the compilation settings of circuitjs to build as a single js file I might be able to embed / bundle (wasn’t able to figure it out)