I first recommend you to look at the out of the box IC Web scratch pad functionality and try to enhance that for your requirement.
Scratch pad is meant for that purpose and you can transfer the text as well, in IC web in any notes area you will see button Import Scratch Pad check the coding behind it and try to use it to update your custom table. Scratch pad text also get cleared automatically on end of the interaction which again suits your requirement.
Hope it would be helpful.
Thanks,
Shobhit