为 SharePoint 2010 开发自定义可编辑可视化 Web 部件 (WebPart)
我想开发一个 Web 部件,允许编辑者使用 Sharepoint 的基于功能区的格式控件修改其内容,然后以格式良好的方式显示该内容。内置内容编辑器 Web 部件还不够,因为我想将内容包装在硬编码的 HTML 中,以强制执行我的网站的图形设计。另外,我希望 Web 部件可能包含多个可编辑区域,而标准内容编辑器 Web 部件只有一个。
我的理想是具有预定义 HTML 布局的可视化 Web 部件,并具有一些可编辑的“内容区域”以允许在编辑模式下进行修改。保存 Web 部件后,它只会将其内容区域呈现为 HTML。我尝试在可视化 Web 部件 ascx 模板中使用
块,但我认为这是不正确的。有人可以给建议吗?
I want to develop a webpart that allows editors to amend its content using Sharepoint's Ribbon-based formatting controls, and then display that content in a nicely formatted way. The built-in content editor webpart isn't sufficient because I want to wrap the content in hardcoded HTML so as to enforce my site's graphical design. Also, I would like the web part to potentially contain more than one editable area, and the standard Content Editor webpart only has one.
My ideal would be a visual web part with a predefined HTML layout, with some editable "content areas" to allow modification in edit mode. When the webpart is saved it will just render its content areas as HTML. I have tried using <SharePoint:RichTextField>
blocks in a visual web part ascx template but I don't think this is correct. Can anyone give advice?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,没有人有答案,所以我必须自己做:)
http://zootfroot.blogspot.com/2010/09/develop-custom-editable-visual-web-part.html
Okay, nobody had an answer so I had to do it myself :)
http://zootfroot.blogspot.com/2010/09/develop-custom-editable-visual-web-part.html