mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-30 10:36:35 +02:00
fix test
This commit is contained in:
parent
63695637b9
commit
04b52d7c1e
@ -1,21 +1,21 @@
|
||||
joplin.plugins.register({
|
||||
onStart: async function() {
|
||||
// const folder = await joplin.data.post(['folders'], null, { title: "my plugin folder" });
|
||||
// await joplin.data.post(['notes'], null, { parent_id: folder.id, title: "testing plugin!" });
|
||||
const folder = await joplin.data.post(['folders'], null, { title: "my plugin folder" });
|
||||
await joplin.data.post(['notes'], null, { parent_id: folder.id, title: "testing plugin!" });
|
||||
|
||||
await joplin.commands.register({
|
||||
name: 'updateCurrentNote',
|
||||
label: 'Update current note via the data API',
|
||||
iconName: 'fas fa-music',
|
||||
execute: async () => {
|
||||
const noteIds = await joplin.workspace.selectedNoteIds();
|
||||
const noteId = noteIds.length === 1 ? noteIds[0] : null;
|
||||
if (!noteId) return;
|
||||
console.info('Modifying current note...');
|
||||
await joplin.data.put(['notes', noteId], null, { body: "New note body " + Date.now() });
|
||||
},
|
||||
});
|
||||
// await joplin.commands.register({
|
||||
// name: 'updateCurrentNote',
|
||||
// label: 'Update current note via the data API',
|
||||
// iconName: 'fas fa-music',
|
||||
// execute: async () => {
|
||||
// const noteIds = await joplin.workspace.selectedNoteIds();
|
||||
// const noteId = noteIds.length === 1 ? noteIds[0] : null;
|
||||
// if (!noteId) return;
|
||||
// console.info('Modifying current note...');
|
||||
// await joplin.data.put(['notes', noteId], null, { body: "New note body " + Date.now() });
|
||||
// },
|
||||
// });
|
||||
|
||||
await joplin.views.toolbarButtons.create('updateCurrentNoteButton', 'updateCurrentNote', 'editorToolbar');
|
||||
// await joplin.views.toolbarButtons.create('updateCurrentNoteButton', 'updateCurrentNote', 'editorToolbar');
|
||||
},
|
||||
});
|
Loading…
Reference in New Issue
Block a user