mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
support for execution of async functions + integration with backend through server.exec()
This commit is contained in:
@@ -196,11 +196,11 @@ const noteEditor = (function() {
|
||||
return currentNote ? currentNote.detail.type : null;
|
||||
}
|
||||
|
||||
function executeScript() {
|
||||
async function executeScript() {
|
||||
if (getCurrentNoteType() === 'code') {
|
||||
const script = codeEditor.getValue();
|
||||
|
||||
eval(script);
|
||||
eval("(async function() {" + script + "})()");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user