I'm thinking about a js script to transform on the fly, when editing a page, the content of a template/of a page into a form (something like what happens when editing Index: pages), converting it back to normal text at upload; it's the main way to help any user to post good, decently standardized content into critical fields. 

Two questions:
1) which is the js script that manages Index page edit?
2) there's some running example of a similiar js script managing other templates/pages into a source project? 

I realize that those questions are a definite proof of my "knowledge" of js tricks, but I don't care about. Yes, I'm an absolute beginner. ;-)

Alex