小编saf*_*dar的帖子

Word 用 Ja​​vaScript 添加 Ins,paragraph.getHtml() 方程转换为图像

我正在创建一个单词插件,我想在其中获取带有图像的 html 形式的 ms word 内容。paragraph.getHtml() 返回的 html 具有图像/方程的 <img> 标签,但我无法获取该图像。


// Run a batch operation against the Word object model.
Word.run(function(context) {
    // Create a proxy object for the paragraphs collection.
    var paragraphs = context.document.body.paragraphs;

    // Queue a command to load the style property for all of the paragraphs.
    context.load(paragraphs, "style");

    // Synchronize the document state by executing the queued commands,
    // and return a promise to indicate task completion.
    return context.sync().then(function() {
      // Queue a a set of …
Run Code Online (Sandbox Code Playgroud)

ms-word word-addins office-js

5
推荐指数
0
解决办法
270
查看次数

标签 统计

ms-word ×1

office-js ×1

word-addins ×1