You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
Desktop: Plugins: Allow commands registered within the beta markdown editor to take arguments (#9963)
This commit is contained in:
@@ -107,8 +107,8 @@ const useEditorCommands = (props: Props) => {
|
||||
if ((editorRef.current as any)[value.name]) {
|
||||
const result = (editorRef.current as any)[value.name](...value.args);
|
||||
return result;
|
||||
} else if (editorRef.current.commandExists(value.name)) {
|
||||
const result = editorRef.current.execCommand(value.name);
|
||||
} else if (editorRef.current.supportsCommand(value.name)) {
|
||||
const result = editorRef.current.execCommand(value.name, ...value.args);
|
||||
return result;
|
||||
} else {
|
||||
logger.warn('CodeMirror execCommand: unsupported command: ', value.name);
|
||||
|
||||
Reference in New Issue
Block a user