if it's unformatted text, then you could get the td's text node and delete it from the Dom and replacing it with a textarea that has a value equivalent to that text node, you would then need to reverse the process after the text area has has been edited to the desired value.
If it's formatted text, you may need to use designMode such as
RichTextEditingDemo, or use another existing rich text editing JS tool.