-
-
Notifications
You must be signed in to change notification settings - Fork 13
Render other VSCode UI view parts #56
Comments
Hi @boan-anbo you can add any monaco-vscode-api service you need (like here), so you could configure everything you require from the official demo. |
Thanks so much! I just tried and attached parts hooking onto the MonacoEditorReactComp's <MonacoEditorReactComp
userConfig={userConfig}
style={{
'paddingTop': '5px',
'height': '200px'
}}
onLoad={() => {
// initiaze our vscode ui by assigning the refs to the corresponding DOM elements
// and handle their visibility.
for (const {part, element} of [
{part: Parts.TITLEBAR_PART, element: titleBarRef.current},
{part: Parts.BANNER_PART, element: bannerRef.current},
{part: Parts.SIDEBAR_PART, element: sideBarRef.current},
{
part: Parts.ACTIVITYBAR_PART,
element: activityBarRef.current
},
// {part: Parts.PANEL_PART, element: panelRef.current},
{
part: Parts.EDITOR_PART,
element: editorPartRef.current
}, {part: Parts.STATUSBAR_PART, element: statusBarRef.current}, {
part: Parts.AUXILIARYBAR_PART,
element: auxiliaryBarRef.current
}
]) {
attachPart(part, element!)
if (!isPartVisibile(part)) {
element!.style.display = 'none'
}
onPartVisibilityChange(part, visible => {
element!.style.display = visible ? 'block' : 'none'
})
}
}}
/> As shown above, I guess I just need to fork |
@boan-anbo I will make the split of |
That'd be awesome! Thanks in advance |
@boan-anbo I have opened PR #59 There are new preview releases available: #59 (comment) |
Thanks so much! Will try it soon and report back. |
@boan-anbo I consider this to be no longer and issue. |
@kaisalmen Thanks so much! Sorry that I didn't get to test it as I later had to switch to non-monaco editors, but really appreciated it! |
Hi there! I have a question about rendering editor parts (e.g. editor group view and side bar) other than the single tab.
I have a working React component set-up similar to
monaco-vscode-api
's demo where I attach the default VSCode UI parts one by one like so:I need the editors view of EditorPart which allows multiple tabs and split views and the file system sidebar to view mounted files.
I wonder if it's possible with monaco-editor-react.
I'd really like to use
monaco-editor-react
UserConfig API etc but I also need the views. Please kindly advise. Thanks!The text was updated successfully, but these errors were encountered: