I just came across a situation in which it would be an elegant solution to have only portions of a text area (previously loaded with text) be editable while other portions a
I'd suggest, rather than trying to break the contents of an input into sub-strings of editable/non-editable content, you use the contentEditable attribute of an HTML element, and use JavaScript to pass that edited value into a hidden input elsewhere in the page.