@sqlrooms/sql-editor / SqlMonacoEditorProps
Interface: SqlMonacoEditorProps
Extends
Omit<MonacoEditorProps,"language">
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
Inherited from
Omit.onMount
onChange?
optionalonChange:OnChange
Callback when the editor content changes
Inherited from
Omit.onChange
className?
optionalclassName:string
CSS class name for the editor container
Default
''Inherited from
Omit.className
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'Inherited from
Omit.theme
value?
optionalvalue:string
The value of the editor
Inherited from
Omit.value
readOnly?
optionalreadOnly:boolean
Whether the editor is read-only
Default
falseInherited from
Omit.readOnly
options?
optionaloptions:IStandaloneEditorConstructionOptions
Additional options for the editor
Inherited from
Omit.options
connector?
optionalconnector:DuckDbConnector
customKeywords?
optionalcustomKeywords:string[]
Custom SQL keywords to add to the completion provider
customFunctions?
optionalcustomFunctions:string[]
Custom SQL functions to add to the completion provider
tableSchemas?
optionaltableSchemas:DataTable[]
Table schemas for autocompletion
getLatestSchemas()?
optionalgetLatestSchemas: () =>object
Callback to get the latest table schemas This is called from within provideCompletionItems to ensure we have the latest data
Returns
object
| Name | Type |
|---|---|
tableSchemas | DataTable[] |
