如何禁用 SharePointWebControls:FieldValue 中的 html 编码?
我正在构建一个发布页面以允许用户添加 YouTube 视频。我为用户创建了一个字段来放置 youtube 嵌入代码,以便我可以将其放入 SharePoint Designer 中的页面模板中。 当我使用 SharePointWebControls:FieldValue
时,它会对包含 html 嵌入代码的字段的 html 进行编码。 如何在此字段中禁用此编码功能? 我检查了 MSDN< /a> 但没有找到该字段的任何属性来完成此任务? 有人能帮我解决这个问题吗?
注意:有一个自己构建(生成)嵌入脚本(字符串连接)的解决方案,但我不想使用它
I'm building a publishing page to allow the user to add youtube video. I created a field to the user to put the youtube embed code so I can put it in a page template in SharePoint Designer.
When I use SharePointWebControls:FieldValue
it encodes the html of the field which contains the html embed code.
How can I disable this encode feature in this field?
I checked the MSDN but didn't find any property of the field to achieve this task?
Can anyone help me in this issue?
Note: there is a solution of building (generate) the embed script myself (string concatenation) but I don't want to use it
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您最好的选择可能是自定义字段编辑器控件 - 支持 html 的开箱即用控件往往会删除对象或视频标签。
您无法单独使用 SharePoint Designer 来完成此操作,但如果您可以部署代码并且只需要为用户支持 SharePoint Designer,则所需的代码相当简单。
Your best option is probably a custom field editor control - the out of box ones that support html tend to strip out object or video tags.
You can't do this with SharePoint Designer alone, but if you can deploy code and just need to support SharePoint Designer for the users the code needed is fairly simple.