问题描述
某些Microsoft Visio必须显示在SharePoint Online中,唯一的选择是将其嵌入到SharePoint中的Iframe WebPart中。
唯一奇怪的是删除了Visio的底部菜单,并且iframe中有许多嵌套的css-我们没有找到一种动态的方法来删除Visio菜单-任何指针都将受到赞赏。
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script>
var iframe = document.getElementById("Iframe");
iframe.onload = function(){
$("#Iframe").contents().find(".mypage-header2").hide();
}
</script>
解决方法
使用javascript / jQuery无法做到这一点,因为出于安全原因,运行Visio的域和运行代码的域是不同的。您可能要考虑使用API Application.showToolbars
来控制工具栏。