1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Desktop: API: Add support for external editing from API

This commit is contained in:
Laurent Cozic
2020-06-20 02:30:09 +01:00
parent e38794171a
commit 45160a2e73
2 changed files with 38 additions and 0 deletions

View File

@ -26,6 +26,21 @@ class ExternalEditWatcher {
return this.instance_;
}
externalApi() {
return {
openAndWatch: async ({ noteId }) => {
const note = await Note.load(noteId);
return this.openAndWatch(note);
},
stopWatching: async ({ noteId }) => {
return this.stopWatching(noteId);
},
noteIsWatched: async ({ noteId }) => {
return this.noteIsWatched(noteId);
},
};
}
tempDir() {
return Setting.value('profileDir');
}