Replies: 2 comments 2 replies
-
You'll need unique ids for each of the cells and then likely a mutable OJS cell with a mapping from ids to payloads, which you will have to maintain yourself. See https://observablehq.com/@observablehq/mutable |
Beta Was this translation helpful? Give feedback.
1 reply
This comment has been hidden.
This comment has been hidden.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Note: I am crossposting this issue from quarto-live - as I am not sure where it belongs. The issue is related to whether there is a way to designate an OJS cell as part of a namespace to avoid variable name collisions.
Background
I am working on an extension that I want to sit on top of quarto live that will let the Editor control a mol* instance embedded in the page. Great news - it works awesome!
Problem
If I have multiple versions of the quart-live<-->OJS pairs in the same page, then the OJS variable gets shadowed. Note in this image that I changed the top editor color to
"red"
where they used to both be"blue"
. I expect only the top one to turn red but the bot of the OJS-reactive canvases turned red because they are keyed to themvsjData
variable .Question
Is there a way to specify an OJS
envir
variable so that I can always pair variable made in one pyodide env to an OJS cell even if they are the same name - e.g.mvsjData
?Beta Was this translation helpful? Give feedback.
All reactions