I would like to add in the web part catalog for the whole farm a specialized version of the content editor web part.

Actually, I want to allow all site managers to drop a content editor that contains a custom script.

I know I could create a custom web part, but it requires a lot of stuff that the oob content editor web part could handle.

2 Answers 2


How about this:

  • Create your CEWP (saved as .dwp)
  • Edit it as you like
  • Export the web part
  • Create a SharePoint Project in VS
  • Create a Module
  • Add the dwp file

Module (CustomCEWP):

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Module Name="CustomCEWP" List="113" Url="_catalogs/wp">
        <File Path="CustomCEWP\CustomCEWP.dwp" Url="CustomCEWP.dwp" Type="GhostableInLibrary">
            <Property Name="Group" Value="My Web Parts" />


<?xml version="1.0" encoding="utf-8"?>
  <WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/WebPart/v2">
  <Title>Custom Content Editor</Title>
  <MissingAssembly>Cannot import this Web Part.</MissingAssembly>
  <Assembly>Microsoft.SharePoint, Version=, Culture=neutral,  PublicKeyToken=71e9bce111e9429c</Assembly>
  <ContentLink xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />
  <Content xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor"><![CDATA[​​  <script>console.log('oh, hai');</script>​]]></Content>
  <PartStorage xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />
  • Sorry, this will not work for whole farm. But you can create a solution with it a Feature and a Module. Let me update...
    – eirikb
    Commented Sep 18, 2012 at 14:54
  • I've created a VS project that deploy my dwp. But I hoped there were a simpler solution.
    – Steve B
    Commented Sep 18, 2012 at 14:57
  • I updated the answer at least, maybe someone else can benefit from it.
    – eirikb
    Commented Sep 18, 2012 at 15:05
  • You could of course be very sneaky and copy/paste a feature directory directly into the <Hive>\TEMPLATE\FEATURES folder. That way you could at least edit your dwp file without having to build it all the time (or compress into wsp manually). If SPSite is close enough you could also upload directly to Web Part Gallery ( /_catalogs/wp/Forms/AllItems.aspx )
    – eirikb
    Commented Sep 18, 2012 at 15:09
  • I ended up by creating a custom wsp file with this simple module. This is working, but a bit disappointing .
    – Steve B
    Commented Sep 18, 2012 at 15:22

Was just looking into this. While it's not farm-wide and will only work at the site collection level (which is all I needed it for), it still may be useful for others that come across this thread.


  • 1
    Sadly doesn't work cross language Commented Nov 6, 2012 at 9:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.