Aymeric Marlange

Get text in the cursor line

This is a script for Drafts.

// loc is the start of cursor line in current draft and len is its length
let [loc, len] = editor.getSelectedLineRange(),
	str = editor.getTextInRange(loc, len);