1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-21 09:38:01 +02:00
joplin/ElectronClient/gui/NoteEditor/utils
Laurent Cozic c63c6370b5 Desktop: Refactored command system
The goal is to make the command system more modular, so each command can
be defined as a single object that includes a declaration (name, label,
etc.) and a runtime (to execute the command, test if it should be
enabled, etc.)

Utility methods are provided to convert a command to a menu item or a
toolbar button, thus reducing duplicated and boiler plate code across the
codebase (often the menu item logic was duplicated in the toolbar
button logic and vice versa).

The goal is to make it easier to add new commands (and associated menu
item and toolbar buttons) and to call them from
anywhere. This is also useful for plugins, which can also easily define
new commands.

Could also allow creating a command palette.
2020-07-03 22:32:39 +01:00
..
contextMenu.ts Tools: Apply linter rules 2020-06-04 18:24:11 +01:00
index.ts Refactor note editor 2020-05-02 16:41:07 +01:00
resourceHandling.ts Desktop: Fixes #3324: Attaching an image, then cancelling the resize dialog, would crash the app 2020-06-04 09:08:13 +01:00
types.ts Desktop: Refactored command system 2020-07-03 22:32:39 +01:00
useDropHandler.ts Refactor note editor 2020-05-02 16:41:07 +01:00
useFormNote.ts Desktop: Regression: Fixed issue with note being needlessly reloaded in WYSIWYG editor 2020-06-07 11:01:33 +01:00
useMarkupToHtml.ts All: Refactored themes to allow using the same ones in both desktop and mobile version 2020-06-10 22:08:59 +01:00
useMessageHandler.ts Tools: Apply linter rules 2020-06-04 18:24:11 +01:00
useNoteSearchBar.ts Refactor note editor 2020-05-02 16:41:07 +01:00
useSearchMarkers.ts Refactor note editor 2020-05-02 16:41:07 +01:00
useWindowCommandHandler.ts Desktop: Refactored command system 2020-07-03 22:32:39 +01:00