Skip to content

How do I integrate the Monaco text editor in a webview? #74

Discussion options

You must be logged in to vote

What's the reason for using a webview?

If you want to edit "like any other file" then you can create a new filesystem scheme and call openTextDocument to open a normal editor. Your filesystem is told when the user asks VS Code to save the file. (VS Code calls writeFile)

The only thing is this editor will be a normal tab. There's limited options for displaying information above or below the editor content in a normal tab. You could make sure the tab opens to the side of your webview instead of on top of it.

You could also implement a notebook, that way there will be one tab with multiple cells, each "cell" is a full JSON editor.

Using Monaco in a webview will be a completely separate inclu…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@Tommycore
Comment options

@Tommycore
Comment options

@Andarist
Comment options

Answer selected by Tommycore
Comment options

You must be logged in to vote
1 reply
@Tommycore
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants