feat: multiple instances of Molecule
Open
enhancement
- Dominant language
- TypeScript
- Stars
- 970
- Forks
- 141
- PR merge metrics
- No merged PRs in 30d
Description
### Description
The Molecule only supports the standalone currently, when you use the `create()` function, it just returns a global `molecule` instance. But some developers need to create multiple instances of Molecule in one page, like:
```ts
const moInstance1 = create({
extensions: [],
});
const moInstance2 = create({
extensions: [],
});
const App1 = () => moInstance.render();
const App2 = () => moInstance2.render();
// Do something
moInstance1.editor. open()
moInstance2.editor. open()
```
Contributor guide
Assessment
This issue has not been assessed yet.