Merge pull request #2995 from beekeeper-studio/docs/ui-kit-sqltexteditor

Update SQLTextEditor docs
This commit is contained in:
Mohammad Azmi
2025-04-11 10:07:45 +07:00
committed by GitHub

View File

@@ -14,9 +14,18 @@
| `keymap` | `string` | Configure the keymap to use. Possible values are 'default', 'vim', 'emacs' and 'sublime'. | `default` |
| `vimConfig` | `object` | Configure vim mode. | `undefined` |
| `vimKeymaps` | `array` | Configure custom key mappings in vim. See documentation in `texteditor/mixin.ts` for more details. | `undefined` |
| `lineWrapping` | `boolean` | Enable line wrapping. | `false` |
| `height` | `number` | Set a fixed height for the editor. | `undefined` |
| `focus` | `boolean` | Control or observe focus state of the editor. | `false` |
| `contextMenuItems` | `array` \| `function` | Add custom items to the context menu. | `undefined` |
| `lineNumbers` | `boolean` | Show line numbers in the editor. | `true` |
| `foldGutter` | `boolean` | Enable code folding in the editor. | `false` |
| `autoFocus` | `boolean` | Automatically focus the editor when it regains window focus after blur. | `false` |
| `columnsGetter` | `(entityName: string) => (string[] \| Promise<string[]>)` | If provided, this function will be called for autocompleting column names instead of using the `entities.columns` property. Expect one argument of type `string` representing a combination of schema name (if exists) and entity name. Accepts async or non-async function. | `undefined` |
| `defaultSchema` | `string` | The default schema to use when autocompleting entity names. Schemas that match this will be prioritized in the autocompletion list. | `public` |
| `mode` | `string` \| `object` | The CodeMirror's mode to use. Modes are JavaScript programs that help color (and optionally indent) text written in a given language. Please refer to CodeMirror's [mode api](https://codemirror.net/5/doc/manual.html#modeapi) learn more | `text/x-sql` |
| `hint` | `string` | The hint option to use for autocompletion. | `'sql'` |
| `clipboard` | `Clipboard` | Custom clipboard handler for the editor used in vim. If provided, it must implement a `write` method to copy text to the clipboard. See [MDN Clipboard API](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard) for more details. |
## Events