quickadd
quickadd copied to clipboard
[FEATURE REQUEST] Get selected text in macro script
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.
+1 and for Capture Format as well. This will allow manipulation of the selected text.