Could someone please help. I am trying to accomplish two goals first I would like to figure out how I can intercept the text pasted into a textbox and then format the text into lines that are no longer than 58 char's long followed by a newline '\n'.
first in the paste: When I paste a long line of text (with no newline char's in it) the function reformatpaste(58) does take what's been pasted and reformats the text to 58 character long lines followed by the '\n' newline character and the line element.value = result; places it in the asp.net textbox. The (problem) the original text from the paste still gets copied to the textbox immediately after the formatted text. (how do I stop the original text from still being pasted in)
Second: the function formatnote() works great when the user types in the textbox. The text is reformatted at the 58 character point where a newline character is added to the line. But if you paste text in and then try editing in the middle of the text, the new characters just spool over and lines go beyond the 58 character point.