Strange question coming ...
I need to be able to provide the user the ability to insert appropriate text (not free-form) at a point in a file.
I was thinking of loading the file into a text area input. There would be an additional set of buttons for each of the pieces of text to be inserted. The user could navigate using their cursor within the text area to the point within the text area where text insertion is to occur. They would then press the appropriate button for that text to be inserted at the cursor.
This raises some challenges! The text could easily be loaded and the entire field disabled, but how would the (presumably) Javascript then be able to insert text at the cursor point? Any help will be much appreciated.