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.
Squashed commit of the following:
commit 5fde36f5c3fa7c7efbce6d81f48fe841c823e88c
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 18:43:20 2020 +0100
Cannot fix for now
commit 251284db3c8b7da6db83f3e06fd19bfdc8b8dd3f
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 18:31:08 2020 +0100
Fixed print to multiple PDFs logic
commit 00d9557996fb984b400fe650594150ae2681e03f
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 17:49:20 2020 +0100
Fixed local search in TinyMCE
commit 46778bf0a79f3bba9ddbc27389fadce4f8944507
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 17:37:31 2020 +0100
Restored note toolbar buttons
commit 3e623c98f0a1cf08bf7d0136f0c8982c5e1ddcd8
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 12:30:57 2020 +0100
Various fixes and moved note toolbar to left of title
commit 790262fe9df5b08d4a619e5244d2906047b39855
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 11:21:11 2020 +0100
Clean up
commit cea30f42e69014ecabda6fa5083199a1ba7b7510
Author: Laurent Cozic <laurent@cozic.net>
Date: Sun May 3 11:08:23 2020 +0100
Fixed note loading in TinyMCE
* Trying to get TuiEditor to work
* Tests with TinyMCE
* Fixed build
* Improved asset loading
* Added support for Joplin source blocks
* Added support for Joplin source blocks
* Better integration
* Make sure noteDidUpdate event is always dispatched at the right time
* Minor tweaks
* Fixed tests
* Add support for checkboxes
* Minor refactoring
* Added support for file attachments
* Add support for fenced code blocks
* Fix new line issue on code block
* Added support for Fountain scripts
* Refactoring
* Better handling of saving and loading notes
* Fix saving and loading ntoes
* Handle multi-note selection and fixed new note creation issue
* Fixed newline issue in test
* Fixed newline issue in test
* Improve saving and loading
* Improve saving and loading note
* Removed undeeded prop
* Fixed issue when new note being saved is incorrectly reloaded
* Refactoring and improve saving of note when unmounting component
* Fixed TypeScript error
* Small changes
* Improved further handling of saving and loading notes
* Handle provisional notes and fixed various saving and loading bugs
* Adding back support for HTML notes
* Added support for HTML notes
* Better handling of editable nodes
* Preserve image HTML tag when the size is set
* Handle switching between editor when the note has note finished saving
* Handle templates
* Handle templates
* Handle loading note that is being saved
* Handle note being reloaded via sync
* Clean up
* Clean up and improved logging
* Fixed TS error
* Fixed a few issues
* Fixed test
* Logging
* Various improvements
* Add blockquote support
* Moved CWD operation to shim
* Removed deleted files
* Added support for Joplin commands