1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-30 10:36:35 +02:00
joplin/packages/editor/CodeMirror/editorCommands/supportsCommand.ts

12 lines
381 B
TypeScript

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;