add settings form to codemirror example

This commit is contained in:
Felix Roos 2023-12-14 11:29:33 +01:00
parent 9474ed7d85
commit 72d1f129cf
4 changed files with 160 additions and 24 deletions

View file

@ -19,6 +19,7 @@ const extensions = {
theme,
isAutoCompletionEnabled,
isPatternHighlightingEnabled,
isActiveLineHighlighted: (on) => (on ? [highlightActiveLine(), highlightActiveLineGutter()] : []),
isFlashEnabled,
keybindings,
};
@ -40,8 +41,6 @@ export function initEditor({ initialCode = '', onChange, onEvaluate, onStop, set
// indentOnInput(), // works without. already brought with javascript extension?
// bracketMatching(), // does not do anything
closeBrackets(),
highlightActiveLineGutter(),
highlightActiveLine(),
syntaxHighlighting(defaultHighlightStyle),
history(),
EditorView.updateListener.of((v) => onChange(v)),