<p>I required to write a small web application that allow customer to select predefined layout template in html and be able to modify it. The application need to allow customer to add block text to pre defined area and images. The block texts need to be able to reorder based on customer need. eg. move up , move down or move to sidebar. THe complete layout will be able to convert to table layout and inline css due to email program doesn't like div &amp; css. I don't know where should I looking for the information to make this happen, could anyone show me how to do this. </p>

<p>Thank you</p>

I'm not sure why someone downvoted you, but check out a javascript framework like
script.aculo.us
or
Yahoo's YUI
Those will go a long way towards creating the interface you need.  Also they have a lot of examples.
The Yahoo framework has an inplace html editor (I think that is what you are asking for).  Another editing is the
fckeditor
.