Plugin samples

Downloading data from internet

This plugin inserts lorem ipsum text generated by online API.

function LoremIpsum(Sender) {
    Script.HTTPGet("http://loripsum.net/api/1/medium/plaintext/prude", &OnDownloaded);
}

function OnDownloaded(Data) {
    Data = Trim(Data);
    if (Data != "") {
        Editor.SelText = Data;
    }
}

Script.RegisterDocumentAction("", "Lorem Ipsum", "", &LoremIpsum);