javascript in views other then html - add position information to span elements

Thanks for sharing your use case! Just to make sure I understand what you're trying to do, could you share an example of the data you want to feed in?

And is there any way you can do more preprocessing on the server side to extract only the text you're looking for, annotate that in smaller chunks in the manual interface and then put it back together based on the character positions and meta? This means you won't have to rely on both the front-end and back-end to do data transformation, which introduces a much higher error potential and risks if they're out-of-sync.

Btw, I also discuss some of the difficulties with using manual interfaces and formatted content in this thread, which might be relevant. Although, it sounds like you already have a good plan for how to solve all of this.

Do you mean pre-defined spans in the input data? If so, it's possible that the manual interface currently doesn't retain custom metadata on spans, as it assumes they'll be added/removed/edited anyways. But I'll need to double-check this!

This is a good point – I definitely want to make all interfaces expose the task data and callbacks if custom JavaScript is enabled, and also allow executing custom scripts across interfaces.