Add text line to range
I've made a plugin that adjusts note anchored lines to serve as brackets for marking ligatures in early music as encountered in this Facebook post (https://www.facebook.com/groups/musescore/posts/7546201332072786?commen…). I've got the tweaks happening pretty well (attached), but I'd like to be able to create the line itself in the plugin on a range of two or more notes.
var bracket = newElement(Element.TEXTLINE); curScore.selection.elements.add(bracket);
but got a
TypeError: Property 'add' of object [object Object] is not a function
What am I missing?