Skip to main content

PasteHtml

Pastes text in the HTML format into the document.

Syntax​

expression.PasteHtml(htmlText, options);

expression - A variable that represents an Api class.

Parameters​

NameRequired/OptionalData typeDefaultDescription
htmlTextRequiredstringA string value that specifies the text in the HTML format to be pasted into the document.
optionsOptionalObjectAdditional paste options.
options.MergeLastOptionalbooleanfalseDefines if the last pasted paragraph is merged into the paragraph it is pasted into instead of being inserted as a paragraph of its own. Use it to replace a part of a paragraph without breaking it in two. Word document editor only.

Returns​

This method doesn't return any data.

Example​

window.Asc.plugin.executeMethod ("PasteHtml", ["<p><b>Plugin methods for OLE objects</b></p><ul><li>AddOleObject</li><li>EditOleObject</li></ul>"]);