@sqlrooms/monaco-editor / MonacoEditorProps
Interface: MonacoEditorProps
Extends
Omit<EditorProps,"onMount">
Properties
defaultValue?
optionaldefaultValue:string
Default value of the current model
Inherited from
Omit.defaultValue
defaultLanguage?
optionaldefaultLanguage:string
Default language of the current model
Inherited from
Omit.defaultLanguage
defaultPath?
optionaldefaultPath:string
Default path of the current model Will be passed as the third argument to .createModel method monaco.editor.createModel(..., ..., monaco.Uri.parse(defaultPath))
Inherited from
Omit.defaultPath
path?
optionalpath:string
Path of the current model Will be passed as the third argument to .createModel method monaco.editor.createModel(..., ..., monaco.Uri.parse(defaultPath))
Inherited from
Omit.path
line?
optionalline:number
The line to jump on it
Inherited from
Omit.line
loading?
optionalloading:ReactNode
The loading screen before the editor will be mounted
Default
"Loading..."Inherited from
Omit.loading
overrideServices?
optionaloverrideServices:IEditorOverrideServices
IEditorOverrideServices
Inherited from
Omit.overrideServices
saveViewState?
optionalsaveViewState:boolean
Indicator whether to save the models' view states between model changes or not Defaults to true
Inherited from
Omit.saveViewState
keepCurrentModel?
optionalkeepCurrentModel:boolean
Indicator whether to dispose the current model when the Editor is unmounted or not
Default
falseInherited from
Omit.keepCurrentModel
width?
optionalwidth:string|number
Width of the editor wrapper
Default
"100%"Inherited from
Omit.width
height?
optionalheight:string|number
Height of the editor wrapper
Default
"100%"Inherited from
Omit.height
wrapperProps?
optionalwrapperProps:object
Props applied to the wrapper element
Inherited from
Omit.wrapperProps
beforeMount?
optionalbeforeMount:BeforeMount
Signature: function(monaco: Monaco) => void An event is emitted before the editor is mounted It gets the monaco instance as a first argument Defaults to "noop"
Inherited from
Omit.beforeMount
onValidate?
optionalonValidate:OnValidate
Signature: function(markers: monaco.editor.IMarker[]) => void An event is emitted when the content of the current model is changed and the current model markers are ready Defaults to "noop"
Inherited from
Omit.onValidate
onMount?
optionalonMount:OnMount
Callback when the editor is mounted
onChange?
optionalonChange:OnChange
Callback when the editor content changes
Overrides
Omit.onChange
className?
optionalclassName:string
CSS class name for the editor container
Default
''Overrides
Omit.className
language?
optionallanguage:string
The language of the editor
Default
'javascript'Overrides
Omit.language
theme?
optionaltheme:"vs-dark"|"light"
The theme of the editor Can be explicitly set or will automatically use the app theme if not provided
Default
'vs-dark'Overrides
Omit.theme
value?
optionalvalue:string
The value of the editor
Overrides
Omit.value
readOnly?
optionalreadOnly:boolean
Whether the editor is read-only
Default
falseoptions?
optionaloptions:IStandaloneEditorConstructionOptions
Additional options for the editor
Overrides
Omit.options
