quickadd icon indicating copy to clipboard operation
quickadd copied to clipboard

[FEATURE REQUEST] Get selected text in macro script

Open Qyriad opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. In Templates and Captures, {{VALUE}} is set to selected text, if there is any. There does not appear to be any way to get the selected text in a Macro, however.

Describe the solution you'd like Something like:

module.exports = async (params) => {
    // One possibility.
    const selection1 = params.selection;
    // Another possibility that sort of mirrors the way it works for other Choice types.
    const selection2 = params.variables["VALUE"];
    // And finally one that simply uses a JavaScript API.
    const selection3 = await params.quickAddApi.getSelection();
}

or anything equivalent.

Qyriad avatar May 03 '23 04:05 Qyriad

+1 and for Capture Format as well. This will allow manipulation of the selected text.

ces3001 avatar Apr 13 '24 19:04 ces3001