PasteHtml 不生效,大家帮忙看下这个demo,为啥 PasteHtml 不能用

阅读次数 64

http://s51ppjwee.hn-bkt.clouddn.com/123kkffd/index.html

    import WebOfficeSDK from './web-office-sdk-solution-v2.0.5.es.js'
    let webOfficeInstance

    const webOfficeSDK = WebOfficeSDK.init({
      officeType: WebOfficeSDK.OfficeType.Writer,
      appId: "AK20230212GHKQOB",
      fileId: "1_1701530801075",
      mount: document.querySelector('#web-office-box'),
    });

    webOfficeSDK.ready().then(async () => {
      webOfficeInstance = webOfficeSDK.Application;
    });

    document.querySelector('#jPasteHtml').addEventListener('click', function () {
      console.log('---jPasteHtml--');
      webOfficeInstance.ActiveDocument.Range(10, 10).PasteHtml({
        HTML: "

dsjdsjkdjk

" }); })
1 Answers

我自己的问题,PasteHtml 被自己浏览器的插件给拦截