# Every word in a different span

**URL:** <https://discuss.prosemirror.net/t/every-word-in-a-different-span/5646>\
**Category:** Uncategorized\
**Created:** [June 26, 2023, 3:02pm UTC](https://discuss.prosemirror.net/t/every-word-in-a-different-span/5646 "2023-06-26T15:02:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raj-divine](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/raj-divine/32/3479_2.png) [@Raj-divine](https://discuss.prosemirror.net/u/Raj-divine)\
**Post date:** [June 26, 2023, 3:02pm UTC](https://discuss.prosemirror.net/t/every-word-in-a-different-span/5646/1 "2023-06-26T15:02:53Z")

</div>

Hey everyone, I’m am working on making an editor where each word should be in a span with some meta data this is because I’m making the editor for viewing the editing transcript. I have a json file containing each word in the transcript and the timestamp of that word. As the audio plays I want to highlight the currently spoken word for which I need access to that word’s timestamp (e.g. where the word started and where it ended `<span data-time-start="32.12" data-time-end="32.9">test</span>`)

I can simply use the json data to create html and insert it into the editor but I can’t do that because I have a text file of the transcript which contains the correctly formatted transcript with all the right linebreaks and speaker tracking. So I want to use that text file to render the text with correct formatting and I also want to keep each word in a span and each paragraph in a p tag.

Please guide me towards the right answer Thank you
