1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-21 09:38:01 +02:00
joplin/packages/editor/CodeMirror/editorCommands/supportsCommand.ts

12 lines
381 B
TypeScript
Raw Normal View History

import { EditorCommandType } from '../../types';
// The CodeMirror 6 editor supports all EditorCommandTypes.
// Note that this file is separate from editorCommands.ts to allow importing it in
// non-browser contexts.
const supportsCommand = (commandName: EditorCommandType) => {
return Object.values(EditorCommandType).includes(commandName);
};
export default supportsCommand;