Open stefaneidelloth opened 3 years ago
As a workaround I could specify some initial esm notebook content that registers the plugin from within the notebook:
# %%--- [esm]
# properties:
# run_on_load: true
# collapsed: false
# ---%%
import {plugin} from "https://cdn.skypack.dev/starboard-observable@0.1.6";
runtime.controls.registerPlugin(plugin);
However, I would prefer to do it in the background (not show that part to the users of the notebook at all).
I would like to use the starboard-observable plugin with starboard-wrap. => How can I do so?
Suggestion: allow to pass some urls to be included as plugin to the constructor:
let starboardUrl = "https://cdn.starboard.gg/npm/starboard-notebook@0.13.2/dist/index.html"; let pluginUrl = "../../../../node_modules/starboard-observable/dist/starboard-observable.js"; let starBoard = new StarboardEmbed({ notebookContent: initialValue, src: starboardUrl, pluginSrc: [pluginUrl] });
If I try to directly import the plugin in the file where I create StarboardEmbed, I get
=> In order to import a plugin, the runtime needs to exist in the current scope.