IHTMLTxtRange::pasteHTMLIHTMLTxtRange::pasteHTML*
*Contents  *Index  *Topic Contents
*Previous Topic: IHTMLTxtRange::parentElement
*Next Topic: IHTMLTxtRange::put_text

IHTMLTxtRange::pasteHTML


HRESULT pasteHTML(
    BSTR html 
);

Pastes HTML text into the given text range. The text completely replaces any previous text and HTML elements in the range.

html
String specifying the HTML text to paste.

Although this method never fails, it might alter the HTML text to make it fit the given text range. For example, attempting to paste a table cell into a text range that does not contain a table might cause the method to insert a TABLE element. For predictable results, you should paste only well-formed HTML text that is appropriate for the given text range.

You cannot use this method while the document is loading. Wait for the onload event before attempting to use it.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.