gzuidhof / starboard-notebook

In-browser literate notebooks
Mozilla Public License 2.0
1.24k stars 99 forks source link

Glitch on initial load of HTML cells #146

Open tennox opened 10 months ago

tennox commented 10 months ago

After discovering the amazing starboard-wrap functionality, I did what any insane person would do, and crafted a starboard notebook demonstrating it :grin:

https://starboard.gg/tennox/starboard-embed-n7dJkNY

But I discovered a glitch when I set the cells to "Run on load", where there is actually a different element returned by document.getElementById, which (I found out via throttling network in devtools) is because the cell editor renders the actual html for a brief moment:

Screenshot from 2023-12-28 10-45-39

I guess it should render a <pre> with the content instead or something like that :thinking:

Workaround (using the last matching element) is shown here: https://starboard.gg/tennox/starboard-embed-workaround-initial-load-nQvX9iF