@sqlrooms/sql-editor / SqlMonacoEditorProps
Interface: SqlMonacoEditorProps
Deprecated
Use SqlCodeMirrorEditor instead. SqlMonacoEditor will be removed in the next major version.
Extends
Omit<MonacoEditorProps,"language">
Properties
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?:Theme
The theme of the editor ('dark' | 'light' | 'system') Can be explicitly set or will automatically use the app theme if not provided
Default
'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.
Note: syntax highlighting is global and uses the built-in DuckDB dialect (DUCKDB_KEYWORDS / DUCKDB_FUNCTIONS) to avoid per-editor global reconfiguration (which can cause flashing). These are currently completion-only.
customFunctions?
optionalcustomFunctions?:string[]
Custom SQL functions to add to the completion provider.
Note: syntax highlighting is global and uses the built-in DuckDB dialect (DUCKDB_KEYWORDS / DUCKDB_FUNCTIONS) to avoid per-editor global reconfiguration (which can cause flashing). These are currently completion-only.
tableSchemas?
optionaltableSchemas?:DataTable[]
Table schemas for autocompletion
getLatestSchemas?
optionalgetLatestSchemas?: () =>object
Callback to get the latest table schemas
Returns
object
| Name | Type |
|---|---|
tableSchemas | DataTable[] |
onRunQuery?
optionalonRunQuery?: (params) =>void
Callback when Cmd/Ctrl+Enter is pressed to run query
Parameters
| Parameter | Type |
|---|---|
params | SqlMonacoRunQueryOptions |
Returns
void
