Copy-pasting examples from the UI

Hello, I have searched the forum but have not found any answers to this.

I would like to be able to select and copy text in the annotation UI, however the labelling interface interferes with the browser selection. Obviously this is by design, but there is still a need to be able to sometimes select and copy text in the normal sense, for example when communicating around an annotation task.

It is possible to select and copy, by using keyboard shortcuts and not releasing the mouse, but this will create an annotation, and is cumbersome, which is not ideal.

Is there a known way around this that is less ugly than what i found? If not, it might be a feature request to be able to select text without annotating by holding down a button, and/or implement copy to clipboard as part of the app.

Hi! I definitely see your point. If it's only for you during development and you don't mind having the browser dev tools open, the easiest way to get the raw text of the current annotation task is to log window.prodigy.content.text. In order to make Prodigy expose this, you need to enable custom JavaScript, e.g. by setting something as "javascript" in your prodigy.json:

"javascript": "console.log('JS enabled')"

If you want this to be more elegant, you could probably also make yourself a little browser bookmarklet that automatically copies window.prodigy.content.text (and/or whichever other task properties you need) to your clipboard. Or an Alfred workflow or something like that. Alternatively, you could also use Prodigy's custom "javascript" to add a button somewhere that does this – this really depends on what you prefer.

This will definitely do the trick, thank you! I really appreciate being able to hack the software like this.

1 Like