将 html 代码添加到 SharePoint Online
Adding html codes to SharePoint Online
是否可以将 html 代码添加到 SharePoint Online?
我想从 Statista 添加一个 html 代码,如下所示:
<a href="https://www.statista.com/statistics/262861/uk-brent-crude-oil-monthly-price-development/" rel="nofollow"><img src="https://www.statista.com/graphic/1/262861/uk-brent-crude-oil-monthly-price-development.jpg" alt="Statistic: Average monthly Brent crude oil price from July 2018 to July 2019 (in U.S. dollars per barrel)* | Statista" style="width: 100%; height: auto !important; max-width:1000px;-ms-interpolation-mode: bicubic;"/></a><br />Find more statistics at <a href="https://www.statista.com" rel="nofollow">Statista</a>
据我所知,只有基于 iframe 的代码才能进入 SP Online。但是,Statista 只提供上述版本。
是否有可能将这些代码添加到 SP Online?
请注意,我真的不熟悉这样的代码。`
提前致谢
马库斯
如果您有标准的 Sharepoint 页面 - 单击添加按钮添加新元素,然后 select "Code Snippet"。然后您可以将代码粘贴到那里。但是,根据您的设置,您可能 运行 遇到一些权限问题。
不支持在 SharePoint 新式页面中添加 html 代码。但是,您可以在经典页面中实现此目的。
转到页面库,创建经典 page.Click 在功能区中编辑源代码并添加代码。
我们可以将 react script editor web part 部署到您的站点,然后将 HTML 代码添加到现代站点页面中的此 Web 部件中。在经典站点页面中,我们可以使用OOTB脚本编辑器web部件来实现。
执行此 OTB 的唯一方法是将 HTML 代码保存为 .aspx 页面,将其上传到文档库,然后使用 'Embed' Web 部件。
非常烦人,因为您必须单独编辑代码,但这将允许 any/all 完全自定义代码 (HTML/CSS/JS) 插入页面。
是否可以将 html 代码添加到 SharePoint Online? 我想从 Statista 添加一个 html 代码,如下所示:
<a href="https://www.statista.com/statistics/262861/uk-brent-crude-oil-monthly-price-development/" rel="nofollow"><img src="https://www.statista.com/graphic/1/262861/uk-brent-crude-oil-monthly-price-development.jpg" alt="Statistic: Average monthly Brent crude oil price from July 2018 to July 2019 (in U.S. dollars per barrel)* | Statista" style="width: 100%; height: auto !important; max-width:1000px;-ms-interpolation-mode: bicubic;"/></a><br />Find more statistics at <a href="https://www.statista.com" rel="nofollow">Statista</a>
据我所知,只有基于 iframe 的代码才能进入 SP Online。但是,Statista 只提供上述版本。 是否有可能将这些代码添加到 SP Online? 请注意,我真的不熟悉这样的代码。`
提前致谢 马库斯
如果您有标准的 Sharepoint 页面 - 单击添加按钮添加新元素,然后 select "Code Snippet"。然后您可以将代码粘贴到那里。但是,根据您的设置,您可能 运行 遇到一些权限问题。
不支持在 SharePoint 新式页面中添加 html 代码。但是,您可以在经典页面中实现此目的。
转到页面库,创建经典 page.Click 在功能区中编辑源代码并添加代码。
我们可以将 react script editor web part 部署到您的站点,然后将 HTML 代码添加到现代站点页面中的此 Web 部件中。在经典站点页面中,我们可以使用OOTB脚本编辑器web部件来实现。
执行此 OTB 的唯一方法是将 HTML 代码保存为 .aspx 页面,将其上传到文档库,然后使用 'Embed' Web 部件。
非常烦人,因为您必须单独编辑代码,但这将允许 any/all 完全自定义代码 (HTML/CSS/JS) 插入页面。