1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-15 09:04:04 +02:00
joplin/ElectronClient/gui/NoteEditor/commands/focusElementNoteBody.ts

24 lines
614 B
TypeScript
Raw Normal View History

import { CommandRuntime, CommandDeclaration } from '../../../lib/services/CommandService';
const { _ } = require('lib/locale');
export const declaration:CommandDeclaration = {
name: 'focusElementNoteBody',
label: () => _('Note body'),
};
export const runtime = (comp:any):CommandRuntime => {
return {
execute: async () => {
comp.editorRef.current.execCommand({ name: 'focus' });
},
// isEnabled: (props:any):boolean => {
// return props.sidebarVisibility;
// },
// mapStateToProps: (state:any):any => {
// return {
// sidebarVisibility: state.sidebarVisibility,
// };
// },
};
};