Ok, instead of all this, I'd store all the text displayed on your websites in a database and then create password-protected forms for your users to go in and change the text without screwing up the layout of the website.
If you want the users to have unfettered control over the entire HTML file, then why not just give them FTP access? I mean if they understand HTML well enough to code it, they can be trusted with FTP access.