Hi again,
But what I want to do is to select/highlight part of the text and run a script, which would add pair tags around the selection - e.g. let's say i select/highlight "Example", I'd run a script and it the output would be Example [b]{startOfTxtInsertedByScript}element {/endOfTxtInsertedByScript} [/b]note
I see what you're after. It could be useful, but I don't think such a feature request would be implemented because it would break compatibility for a
lot of scripts and add-ins already out there.
You might have more luck if you request it as a new add-in event, specifically a
context item event. These deal with selections in the GUI (selecting an element in the browser or a diagram), and this could fit in alongside those. Something like
EA_OnTextSelectionChanged(repository, guid, objectType, property, startPos, endPos)where
repository,
guid and
objectType are the same as in the three existing operations,
startPos and
endPos are integers specifying the selection in the string, and
property is an enum specifying which property the selection is in (name, alias, notes, etc).
Now, adding another add-in event doesn't help you if you're just using the Object Model (scripting). But you can created scripted add-ins these days (as opposed to .NET DLL ones), so you could make that work.
So as an add-in event I think it's worth a feature request.
/Uffe