mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
fix: codemirror enable searchKeymap, selectAll
This commit is contained in:
parent
a3f792944c
commit
32dd4c3d08
1 changed files with 12 additions and 2 deletions
|
|
@ -1,8 +1,9 @@
|
|||
import { EditorView, lineNumbers, keymap } from '@codemirror/view';
|
||||
import { ViewPlugin } from '@codemirror/view';
|
||||
import { indentWithTab } from '@codemirror/commands';
|
||||
import { indentWithTab, selectAll } from '@codemirror/commands';
|
||||
import { foldGutter, foldKeymap } from '@codemirror/language';
|
||||
import { history, historyKeymap } from '@codemirror/commands';
|
||||
import { searchKeymap } from '@codemirror/search';
|
||||
import { html } from '@codemirror/lang-html';
|
||||
import { javascript } from '@codemirror/lang-javascript';
|
||||
import { json } from '@codemirror/lang-json';
|
||||
|
|
@ -154,7 +155,16 @@ export function createCodeMirror(element, options = {}) {
|
|||
createResizePlugin(),
|
||||
...(Array.isArray(languageSupport) ? languageSupport : [languageSupport]),
|
||||
...themeSupport,
|
||||
keymap.of([indentWithTab, ...foldKeymap, ...historyKeymap]),
|
||||
keymap.of([
|
||||
indentWithTab,
|
||||
...foldKeymap,
|
||||
...historyKeymap,
|
||||
...searchKeymap,
|
||||
{
|
||||
key: 'Mod-a',
|
||||
run: selectAll,
|
||||
},
|
||||
]),
|
||||
EditorView.theme({
|
||||
'&': {
|
||||
fontSize: '14px',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue