"my end goal is to be able to track changes to variable text that gets added to a text frame that has particular tags in it."
The text frame is tagged or the text itself is tagged? How is the text getting added in?
The text itself is tagged. I am retrieving the text from a database and replacing the corresponding <text1> with the text from the database. I then want to be able to update the database with just changes that occurr to the database text that got added. It is very simple when the textframe just holds one <text1> with no static text, because in that instance I just take whatever is in the textframe and update the database when the editing in indesign is complete. However, I would like to add the capability of having more than one <text*> label and also be able to have static text.
Database looks like this:
text1 = "1.99"
text2 = "2.99"
textFrame looks like this:
Reg price <text2>
After replacing the text:
Reg price 2.99
Then lets say I edit the second price and text:
Regular price 4.00
I then want to update the database to say
text1 = "1.99"
text2 = "4.00"
I hope thats more clear!
When I do this, I only update the database, and then re-export the updated information to a tagged text file which is then placed in InDesign.
I'm trying to establish a push and pull scenario where I can pull from the database, and then push changes made in indesign back to the database. I have this working when there is only one <text*> tag per text frame and no other text previously in the text frame. Where I run into trouble is being able to track what tag gets changed when there are multiple <text*> tags in one text frame.