Skip to content

API

Props

NameTypeDefaultDescription
modelValuestring''Editor content.
triggerCharactersstring[][]Extra completion trigger characters.
customKeywordsstring[][]Extra SQL completion keywords.
databaseOptionsDatabaseOption[][]Database, table and field completion data.
widthnumber | string0Editor width. Numbers are pixels; percentages use parent width. Uses parent width when set to 0.
heightnumber | string100Editor height. Numbers are pixels; percentages use parent height.
monacoEditorOptionIStandaloneEditorConstructionOptions{}Native Monaco editor options.
monacoEditorTheme'vs' | 'vs-dark' | 'hc-black''vs'Monaco theme.

Events

NameDescription
update:modelValueEmitted when editor content changes.

Exposed Methods

NameDescription
initEditorInitialize the editor instance.
resetEditorClear the editor content.
insertTextInsert text at the cursor.
getSelectedTextGet the current selected text.
replaceSelectedTextReplace the current selection.
replaceTextReplace the full editor content.

Released under the MIT License.