Answered Sharepoint 2010-content editable web part

  • 2012年7月18日 22:28
     
     

    We are trying to create a web part where the user can edit the content directly, just like using a wiki page. I understand we can use content editor web part for this purpose but we would like to give users more freedom to enter whatever they want. Does anybody know how this can be done?

    Thanks very much in advance.


    Little fish 920

全部回复

  • 2012年7月18日 23:45
     
     
    Wat type of content is the user wants to edit, either SP List or Library Items. If he wants to edit the list, you can go for ModalDialogs  based Forms (like EditForm.aspx) rather than webparts.

    Naren.

  • 2012年7月19日 0:08
     
     
    Thanks very much for you reply neran27. The content will probably mostly be rich text or images. We are not expecting to manuplating on lists or items from there.

    Little fish 920

  • 2012年7月19日 4:34
     
      包含代码

    Hello,

    If you are using the publishing site then you can also use the Page content control in your publishing page layout

    <PublishingWebControls:RichHtmlField ID="RichHtmlField1" FieldName="PublishingPageContent" HasInitialFocus="True" MinimumEditHeight="400px" runat="server"/>

    This control have similar effect as content editor webpart , you can also add the webpart inside the page content control.

    you can add the content by editing the page 


    Hiren Patel | Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.

  • 2012年7月19日 21:48
     
     

    Hi Hiren,

    Thanks very much for your input. I am a little confused about the usage of the rich text control. It looks like it takes the content from an existing page, but what I need is a separate region where the user can input rich text, just like a content editor web part. Is there a way to do that?

    Thanks.


    Little fish 920

  • 2012年7月23日 7:21
    版主
     
     已答复

    Hi Littlefish920,

    From your description, you can use SharePoint Content Editor Web Part or custom web part and use rich text control, both of them allow users to add rich text, images or tables. Based on my understanding, the Editing tools in wiki page is just like that in CEWP, if you want to achieve editing text like in wiki page, you can choose to use CEWP, and rich text control also provide special format used to create hypertext documents, you can edit the text in rich format, more information about rich text control:
    http://msdn.microsoft.com/en-us/library/ms976293.aspx

    Thanks,


    Qiao Wei

    TechNet Community Support