1. A method for editing a text portion of a contents of a Hypertext Markup Language (“HTML”) document in a window of a web browser, the method comprising: presenting the HTML document in the window of the web browser; receiving a request to edit the text portion of the contents of the HTML document; in response to the request, determining a position and a size of the text portion of the contents of the HTML document as displayed in the window; creating an editing surface overlaying the text portion of the contents of the HTML document as displayed in the window, the editing surface created by adding an HTML element to the HTML document having size and position attributes that cause the editing surface, when rendered by the web browser, to be displayed in the window at the position and of the size of the text portion of the contents of the HTML document; copying the text portion of the contents of the HTML document to the editing surface; receiving input within the window; upon receiving the input, determining whether the editing surface will process the input; upon determining that the editing surface will process the input, passing the input to the editing surface for processing and performing a reflow operation on the editing surface; upon determining that editing surface will not process the input, applying any changes to the contents of the HTML document, removing the editing surface from the HTML document, and making the text portion of the contents of the HTML document as displayed in the window visible; receiving a request to stop editing the text portion of the contents of the HTML document; and in response to receiving the request, applying the one or more changes to the contents of the HTML document and destroying the editing surface.
6. The method of claim 1 , wherein performing a reflow operation on the editing surface comprises: determining whether it is necessary to reflow the editing surface in the window; and upon determining that it is necessary to reflow the editing surface, applying the one or more changes to the contents of the HTML document, causing the web browser to re-render the HTML document in the window, determining a new position and a new size of the text portion of the contents of the HTML document as displayed in the window, and modifying the size and position attributes of the HTML element added to the HTML document such that the editing surface is rendered by the web browser in the window at the new position and of the new size of the text portion of the contents of the HTML document.