reactjs - 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.
解决方案
我也有这个类似的问题。问题在于src=[${linkToPPTFile}]
iframe src 的这一部分。拆下盒子支架。它应该只是:
<iframe
src={`https://view.officeapps.live.com/op/embed.aspx?src=${linkToPPTFile}`}
width="100%"
height="600px"
frameBorder="0"
>
</iframe>
推荐阅读
- vba - 根据持续时间和缩进删除任务
- r - R:write_xlsx 参数中有评估问题
- python - 读取 .dat 文件并包含空格
- javascript - JavaScript:根据输入字段值将查询字符串添加到 URL(如果已设置)?
- sql-server - 连接四个时计算两个表中的值
- bcp - BCP -w 复制 0 行而没有错误消息
- php - 使用 JWT 连接到 DocuSign API 的后端计划脚本
- spring-boot - Hikari 连接没有超时
- ethereum - 无法通过 Remix 部署简单的 Solidity 合约
- python - Pyspark UDF - TypeError:“模块”对象不可调用