防止“在新窗口中打开” WOPIFrame中的按钮操作 [英] Prevent "Open in New Window" button action in WOPIFrame

查看:89
本文介绍了防止“在新窗口中打开” WOPIFrame中的按钮操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个应用程序从SharePoint API中提取数据并将其显示在网页上。当用户点击缩略图时,它会打开一个新页面(IFRAME),文档位于WOPIFrame中,以便他们可以预览。该操作设置为interactivepreview
,因此无法修改该文件。但是,如果他们点击文档右下角的链接"在新窗口中打开",它将使用action = preview在新窗口中打开文档,以便他们可以编辑它。我想阻止用户在新窗口中打开
,或者如果他们确实单击此操作,则在interactivepreview模式下在新窗口中打开,以便他们无法编辑它。如何隐藏此功能或修改它以使它永远不会以action = preview打开文档?

I have an application that pulls data from the SharePoint API and displays it on a web page. When the user clicks on the thumbnail, it opens a new page (IFRAME) with the document in a WOPIFrame so they can preview it. The action is set to interactivepreview so they can't modify the file. However, if they click the link in the bottom right of the document "Open in New Window" it will open the document in a new window with the action=preview so they can edit it. I want to either prevent the user from opening in a new window, or if they do click this action, open in a new window in interactivepreview mode so they can't edit it. How can I either hide this functionality or modify it so it never opens the document as action=preview?

谢谢。

推荐答案

您好katghoti,

Hi katghoti,

您是如何从SharePoint API中提取数据并将其显示在网页上的?您是否在SharePoint环境中使用Office Web应用程序?

How did you pull data from SharePoint API and display it on the web page? Did you use the office web app in your SharePoint environment?

您能否提供有关该问题的更多详细信息?

Could you please provide more details about the issue?

您能编辑链接吗?文件?如果可以,那么您可以添加如下链接。如果您将目标设置为"_self",则不会在新窗口中打开该链接。

Can you edit the link of the document? If you can, then you could add the link as below. If you set target as "_self", it will not open the link in a new window.

< a href =" http:// yoursiteurl"    target = " _self "> test< / a>

<a href="http://yoursiteurl"   target="_self">test </a>

然后你也可以在IE中设置。转到IE->互联网选项 - >在选项卡下的常规选项卡上单击"选项卡"。然后重新启动计算机以使其生效。

And then you also could set in IE. Go to IE-> Internet Options-> On the General tab under Tabs click on "Tabs". Then restart the computer to take effect.




祝你好运,

Sara Fan


这篇关于防止“在新窗口中打开” WOPIFrame中的按钮操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆