1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-13 00:10:37 +02:00

Desktop: CodeMirror 6 plugin API: Improve ability to register custom commands (#9956)

This commit is contained in:
Henry Heino
2024-02-19 02:04:20 -08:00
committed by GitHub
parent 0b2bb80bb8
commit 2d0a53eaca
4 changed files with 28 additions and 8 deletions

View File

@ -10,7 +10,7 @@ import {
import swapLine, { SwapLineDirection } from './swapLine';
import { closeSearchPanel, findNext, findPrevious, openSearchPanel, replaceAll, replaceNext } from '@codemirror/search';
type EditorCommandFunction = (editor: EditorView)=> void;
export type EditorCommandFunction = (editor: EditorView)=> void;
const editorCommands: Record<EditorCommandType, EditorCommandFunction> = {
[EditorCommandType.Undo]: undo,