<MonacoEditor>
As if it were an <input>
or <textarea>
, you can easily use <MonacoEditor>
component to show the editor.
Get & Set value
Fallback Content
Children of <MonacoEditor>
will be shown until the editor is loaded.
Props
langstring
plaintext
A programming language for colorization, which will override the editor's option options.language
.
Available languages are listed here.
optionsIStandaloneEditorConstructionOptions
Options passed to the second argument of monaco.editor.create
.
You can also change the options after the editor mounted.
Available options are listed here.
modelUrimonaco.Uri
The URI that identifies models.
Events
load
Emitted with an instance of IStandaloneCodeEditor
when the editor is loaded
Ref
of <MonacoEditor>
You can access to the editor instance by using useTemplateRef
(or ref
) and $editor
.