locked
Content Editor web part RRS feed

  • Question

  • Hi

    In Sharepoint 2007, the Content Editor web part allowed for entering HTML. In Sharepoint 2010 version of this web part, I don't see this option. Am I just not seeing it?

    Paul

    Tuesday, July 17, 2012 8:03 PM

Answers

  • Ranjoe -

    I hate to say this, but I have to disagree. There's no reason why you can't put HTML or Javascript directly into the Content Editor Web Part using the Edit HTML Source button in Editing tab of the Ribbon, as shown in the second link I provided above. Sure, it's definitely possible to link the CEWP to a separate file and often times easier to maintain and update, but not required.

    After doing some more digging on this, I've found several links that I think are highly relevant in addition to the two I've posted above:

    • SharePoint MVP Marc Anderson has a quick post with some good conversations he had on the CEWP and how he proved that you can edit source code directly in the CEWP: http://sympmarc.com/2010/10/26/script-in-content-editor-web-parts-cewps-in-sharepoint-2010/
    • Marc also links to a great article by Christophe Humbert (http://blog.pathtosharepoint.com/2010/10/27/about-scripts-web-parts-and-urban-myths) which I think is a very good summary of exactly this question about the CEWP versus the HTML Form web part. In it he points out that the CEWP can do this as well, but also states that the HTML Form web part delivers more functionality (it can handle Form tags, the CEWP can't) but does also come with the drawback of not being able to link to external source files like the CEWP. Personally I really prefer to use the external files for my source in cases like this, so that's why I prefer the CEWP over the HTML Form web part.

    John


    MCITP and MCTS: SharePoint, Virtualization, Project Server 2007
    My books on Amazon: The SharePoint 2010 Disaster Recovery Guide and The SharePoint 2007 Disaster Recovery Guide.
    My blog: My Central Admin.

    • Marked as answer by Jack-Gao Friday, July 27, 2012 11:22 AM
    Thursday, July 19, 2012 2:10 PM
  • Yes I think you're right :). What I was talking about is the controls inside the Edit WebPart properties. just got mislead there. its just that the Html Form web part has that button like the button in the 2007 CEWP. Thanks for the info :)
    • Marked as answer by Jack-Gao Friday, July 27, 2012 11:22 AM
    Thursday, July 19, 2012 3:14 PM

All replies

  • Look for the webpart named as HTML form Webpart.
    Tuesday, July 17, 2012 8:08 PM
  • The Content Editor web part is still available in SharePoint 2010, you should see it in the Media and Content Category within a site's web part gallery.

    For some pretty good info on how to add the web part to a page in SharePoint 2010 and use it to display HTML content, I would start with this page: http://office.microsoft.com/en-us/sharepoint-foundation-help/using-the-content-editor-web-part-HA101794745.aspx

    For working directly with HTML source in the web part, you may also want to take a look at this article: http://www.sharepoint-insight.com/2010/07/19/how-to-edit-source-in-sharepoint-2010-content-editor-web-part-cewp/

    John


    MCITP and MCTS: SharePoint, Virtualization, Project Server 2007
    My books on Amazon: The SharePoint 2010 Disaster Recovery Guide and The SharePoint 2007 Disaster Recovery Guide.
    My blog: My Central Admin.

    Tuesday, July 17, 2012 8:46 PM
  • yes it is available but that would require a separate file for you to input what ever you want either script css or whatever you want. HTMl Form web part actually have a source editor in which you can type it directly. So i can say that the Content Editor Web Part of 2007 is separated into 2. the Content Editor Web Part of 2010 and the HTML form web part.

    :) ranjoe

    Thursday, July 19, 2012 12:50 PM
  • Ranjoe -

    I hate to say this, but I have to disagree. There's no reason why you can't put HTML or Javascript directly into the Content Editor Web Part using the Edit HTML Source button in Editing tab of the Ribbon, as shown in the second link I provided above. Sure, it's definitely possible to link the CEWP to a separate file and often times easier to maintain and update, but not required.

    After doing some more digging on this, I've found several links that I think are highly relevant in addition to the two I've posted above:

    • SharePoint MVP Marc Anderson has a quick post with some good conversations he had on the CEWP and how he proved that you can edit source code directly in the CEWP: http://sympmarc.com/2010/10/26/script-in-content-editor-web-parts-cewps-in-sharepoint-2010/
    • Marc also links to a great article by Christophe Humbert (http://blog.pathtosharepoint.com/2010/10/27/about-scripts-web-parts-and-urban-myths) which I think is a very good summary of exactly this question about the CEWP versus the HTML Form web part. In it he points out that the CEWP can do this as well, but also states that the HTML Form web part delivers more functionality (it can handle Form tags, the CEWP can't) but does also come with the drawback of not being able to link to external source files like the CEWP. Personally I really prefer to use the external files for my source in cases like this, so that's why I prefer the CEWP over the HTML Form web part.

    John


    MCITP and MCTS: SharePoint, Virtualization, Project Server 2007
    My books on Amazon: The SharePoint 2010 Disaster Recovery Guide and The SharePoint 2007 Disaster Recovery Guide.
    My blog: My Central Admin.

    • Marked as answer by Jack-Gao Friday, July 27, 2012 11:22 AM
    Thursday, July 19, 2012 2:10 PM
  • Yes I think you're right :). What I was talking about is the controls inside the Edit WebPart properties. just got mislead there. its just that the Html Form web part has that button like the button in the 2007 CEWP. Thanks for the info :)
    • Marked as answer by Jack-Gao Friday, July 27, 2012 11:22 AM
    Thursday, July 19, 2012 3:14 PM
  • Thanks for the responses. I was able to use the HTML form web part--after some issues with its configuration on our server, but it is good to know about the Edit HTML Source button in the ribbon of the Content Editor web part.

    Paul

    Thursday, July 19, 2012 5:02 PM
  • Vote as Helpful if you thing that the replies help you, or proposed as answer if you think it resolves your problem :)

    Thursday, July 19, 2012 5:15 PM