If I understand the code correctly, it's currently only possible to render one editor on the page if you're using lazy/hydrate.
Would be great if we could pass a selector to these functions, plus unique workspaces to each of them.
Something like this would already be sufficient I think:
const el = document.getElementById('my-editor');
const workspace = new Workspace(...);
hydrate({
element: el,
workspace
});
Why I want this?
I'm running my own course platform, and on these pages there's potentially multiple exercises, each running their own playground.
--
Thanks for making this library! So far it looks super useful. I'm already trying to implement it in my platform, although I'm not sure if that's a wise decision while it is still in early development 😁
If I understand the code correctly, it's currently only possible to render one editor on the page if you're using lazy/hydrate.
Would be great if we could pass a selector to these functions, plus unique workspaces to each of them.
Something like this would already be sufficient I think:
Why I want this?
I'm running my own course platform, and on these pages there's potentially multiple exercises, each running their own playground.
--
Thanks for making this library! So far it looks super useful. I'm already trying to implement it in my platform, although I'm not sure if that's a wise decision while it is still in early development 😁