(core) Add Command API to Grist Plugin API

Summary:
The new Command API provides limited access to Grist Commands from within cusotm
widgets. This includes the ability to perform undo and redo, which is bound to
the same keyboard shortcut as Grist by default.

Test Plan: Browser tests.

Reviewers: jarek

Reviewed By: jarek

Subscribers: paulfitz, jarek

Differential Revision: https://phab.getgrist.com/D4050
This commit is contained in:
George Gevoian
2023-09-26 16:37:27 -04:00
parent 9b36fb4dab
commit f38df564a9
8 changed files with 69 additions and 1 deletions

View File

@@ -32,6 +32,7 @@ function setup() {
grist.onNewRecord(function(rec) {
document.getElementById('record').innerHTML = 'new';
});
grist.enableKeyboardShortcuts();
}
window.onload = setup;