Word JavaScript API 1.2 的最近更新

WordApi 1.2 添加了对内联图片的支持。

API 列表

下表列出了 Word JavaScript API 要求集 1.2 中的 API。 若要查看Word JavaScript API 要求集 1.2 或更低版本支持的所有 API 的 API 参考文档,请参阅要求集 1.2 或更低版本中Word API

说明
正文 insertInlinePictureFromBase64 (base64EncodedImage: string, insertLocation: Word。InsertLocation.start |Word。InsertLocation.end |“Start” |“End”) 将图片插入到正文中的指定位置。
ContentControl insertInlinePictureFromBase64 (base64EncodedImage: string, insertLocation: Word。InsertLocation.replace |Word。InsertLocation.start |Word。InsertLocation.end |“Replace” |“Start” |“End”) 将嵌入式图片插入到内容控件中的指定位置。
InlinePicture delete() 从文档中删除嵌入式图片。
insertBreak (breakType: Word。BreakType |“Page” |“下一步” |“SectionNext” |“SectionContinuous” |“SectionEven” |“SectionOdd” |“Line”,insertLocation:Word。InsertLocation.before |Word。InsertLocation.after |“Before” |“After”) 在主文档的指定位置插入分隔符。
insertFileFromBase64 (base64File: string, insertLocation: Word。InsertLocation.before |Word。InsertLocation.after |“Before” |“After”) 在指定位置插入 document。
insertHtml (html: string, insertLocation: Word。InsertLocation.before |Word。InsertLocation.after |“Before” |“After”) 在指定位置插入 HTML。
insertInlinePictureFromBase64 (base64EncodedImage: string, insertLocation: Word。InsertLocation.replace |Word。InsertLocation.before |Word。InsertLocation.after |“Replace” |“Before” |“After”) 在指定位置插入 inlinePicture。
insertOoxml (ooxml: string, insertLocation: Word。InsertLocation.before |Word。InsertLocation.after |“Before” |“After”) 在指定位置插入 OOXML。
insertParagraph (paragraphText: string, insertLocation: Word。InsertLocation.before |Word。InsertLocation.after |“Before” |“After”) 在指定位置插入段落。
insertText (text: string, insertLocation: Word。InsertLocation.before |Word。InsertLocation.after |“Before” |“After”) 在指定位置插入文本。
paragraph 获取包含嵌入式图像的父段落。
选择 (selectionMode?: Word。SelectionMode) 选择 inlinePicture。
区域 inlinePictures 获取区域中对象的 InlinePicture 集合。
insertInlinePictureFromBase64 (base64EncodedImage: string, insertLocation: Word。InsertLocation |“Replace” |“Start” |“End” |“Before” |“After”) 在指定位置插入图片。

另请参阅