跳到主要内容

以 Html 格式粘贴

以 HTML 格式将文本粘贴到文档中。

语法

expression.PasteHtml(htmlText);

expression - 表示 Api 类的变量。

参数

名称必填/选填数据类型默认值描述
htmlText必填string指定以 HTML 格式粘贴到文档中的文本字符串。

返回值

此方法不返回任何值。

示例

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