首页 > 解决方案 > Powerpoint viewer for react?

问题描述

I searched a lot for this but couldn't find any package or a guide on how to view a ".ppt" file on a webpage using react.js.

I'm allowing the user to upload a ".ppt" file, and I want him to be able to view that "Powerpoint" file in a web page, is that even possible?

I tried the following but it didn't work ...

<iframe
    src={`https://view.officeapps.live.com/op/embed.aspx?src=[${linkToPPTFile}]`}
    width="100%"
    height="600px"
    frameBorder="0"
></iframe>

Any help will be appreciated.

标签: reactjspowerpointpresentationcontentpresenter

解决方案


我也有这个类似的问题。问题在于src=[${linkToPPTFile}]iframe src 的这一部分。拆下盒子支架。它应该只是:

<iframe
    src={`https://view.officeapps.live.com/op/embed.aspx?src=${linkToPPTFile}`}
    width="100%"
    height="600px"
    frameBorder="0"
>
</iframe>

推荐阅读