There is a quite good explanation on monaco-editor GitHub .
The tab is just a visual representation of Radio Button or Simple Button for example, where you have to subscribe onChange event. In the event handler, you have to update the model and view state, eg switching between foo.js & foo1.js files.
editor.setModel(data[desiredModelId].model);
editor.restoreViewState(data[desiredModelId].state);
I had the requirement for Monaco editor with tabs and built this project which you can use as the license is MIT:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.