You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-13 00:10:37 +02:00
Desktop: Plugins: Allow commands registered within the beta markdown editor to take arguments (#9963)
This commit is contained in:
@ -533,6 +533,8 @@ export interface MarkdownItContentScriptModule extends Omit<ContentScriptModule,
|
||||
plugin: (markdownIt: any, options: any)=> any;
|
||||
}
|
||||
|
||||
type EditorCommandCallback = (...args: any[])=> any;
|
||||
|
||||
export interface CodeMirrorControl {
|
||||
/** Points to a CodeMirror 6 EditorView instance. */
|
||||
editor: any;
|
||||
@ -541,8 +543,9 @@ export interface CodeMirrorControl {
|
||||
/** `extension` should be a [CodeMirror 6 extension](https://codemirror.net/docs/ref/#state.Extension). */
|
||||
addExtension(extension: any|any[]): void;
|
||||
|
||||
execCommand(name: string): any;
|
||||
supportsCommand(name: string): boolean;
|
||||
execCommand(name: string, ...args: any[]): any;
|
||||
registerCommand(name: string, callback: EditorCommandCallback): void;
|
||||
|
||||
joplinExtensions: {
|
||||
/**
|
||||
|
Reference in New Issue
Block a user