notesy::links

Opening a web page in the browser, or a mail address in the mail app. Takes links.open.

rustuse notesy::{commands, links};

pub fn ready() {
    commands::add("help", "Tasks help", |command| links::open("https://example.com/tasks/help"));
}
Function What it does
links::open(url) Opens url: an https:// or http:// page, or a mailto: address. Anything else (a file, another app's own scheme) is an error.

Opening a page is the user's browser going there, not the plugin: a script reaches the network only through notesy::net, and only to the sites in its [net]. notesy checks the plugin's permission again for each call.

A page's address can carry what the plugin read, though, so links.open is shown in red, and the prompt warns when the plugin can also read what's yours. In a preview, links are held back unless it's run with --trust.

Every page