tero.co.uk

Javascript Editor

This page demonstrates a basic Javascript HTML editor. There are much more advanced editors out there, but I developed this one so it can easily replace text area's in web pages.

The main advantage is that it stores line breaks as normal line breaks, not as <p> or <br/> tags, on both Firefox and Internet Explorer. This means that if a user does not have a capable browser, then can still edit the text, without having to deal with extraneous tags (though the breaks will have to be reinserted when the text is displayed). The editor uses objects, so that all the code is self contained. You can have many editors on the same page. And it produces consistent tags on Internet Explorer and Firefox (<u>, <em> and <strong>).