You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if you need access to a certain functionality in QOwnNotes or have
questions or ideas please open an issue on the
QOwnNotes issue page
since debug output is disabled in the releases of QOwnNotes, so you might want
to use console.warn() instead of console.log() to actually see an output
additionally you can also use the script.log() command to log to the
log dialog
Methods and objects QOwnNotes provides
Starting an external program in the background
Parameters
/** * QML wrapper to start a detached process * * @param executablePath the path of the executable * @param parameters a list of parameter strings * @return true on success, false otherwise*/boolstartDetachedProcess(QString executablePath, QStringList parameters);
/** * QML wrapper to get the current note folder path * * @return the path of the current note folder*/
QString currentNoteFolderPath();
Usage in QML
varpath=script.currentNoteFolderPath();
Getting the current note
Parameters
/** * QML wrapper to get the current note * * @returns {NoteApi} the the current note object*/
NoteApi currentNote();
Usage in QML
varnote=script.currentNote();
Logging to the log dialog
Parameters
/** * QML wrapper to log to the log dialog * * @param text*/voidlog(QString text);
Usage in QML
script.log("my text");
Downloading an url to a string
Parameters
/** * QML wrapper to download an url and returning it as text * * @param url * @return {QString} the content of the downloaded url*/
QString downloadUrlToString(QUrl url);