title: SharePoint 2013 Can't edit the Content Editor snippet
body: <p>In SharePoint 2013 it is possible to create master pages and page layouts using the new Design Manager. After converting a HTML file to a masterpage, or after creating a new page layout, one can add SharePoint functionality by using the Snippet Manager. I have used this approach to convert a static HTML/CSS file into an SharePoint masterpage with accompanying page layouts. I'm able to use all the snippets from the Snippet Manager, except for the "Content Editor" snippet. I was able to add top navigation, the quick launch bar, page properties and even "Web Part Zone" snippets.</p>
  
  <p><strong>The usecase:</strong><br>
  I want to have a editable footer. The footer consists of four parts, so I added four Content Editor snippets, by pasting the snippet code into the HTML masterpage. When generating a snippet, it's possible to set custom properties. I noticed that it's not possible to set the WebPartID over here. In the snippet, the following WebPartID is always used: 00000000-0000-0000-0000-000000000000. The "Web Part Zone" snippet however will generate a (random?) WebPartID (and works). </p>
  
  <p><strong>The problem:</strong><br>
  Adding the snippet works fine, but when I publish the master page or page layout it's not possible to edit the CEWP. When I edit a page which uses either the master page or the page layout, the CEWP should transform to an editable region, but it doesn't. There is no error shown. The webpart renders itself correctly.</p>
  
  <p><strong>What I tried:</strong><br>
  I tried filling in a random WebPartID, but that doesn't work. Searching on Google and on StackOverflow didn't gave me any clues, I can't find anyone facing the same problem.</p>
  
  <p><strong>The code:</strong><br>
  The following snippet is generated:</p>
  
  <pre><code>&lt;!--CS: Start Content Editor Snippet--&gt;&lt;!--SPM:&lt;%@Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%&gt;--&gt;&lt;!--MS:&lt;WebPartPages:ContentEditorWebPart xmlns:WebPartPages="namespace" runat="server" webpart="true"&gt;--&gt;&lt;!--PS: Start of READ-ONLY PREVIEW (do not modify)--&gt;&lt;div class="ms-webpart-chrome ms-webpart-chrome-fullWidth "&gt;&lt;div WebPartID="00000000-0000-0000-0000-000000000000" HasPers="true" id="WebPart" width="100%" class="ms-WPBody noindex " OnlyForMePart="true" allowMinimize="false" allowRemove="false" allowDelete="false" style=""&gt;&lt;div class="ms-rtestate-field"&gt;&lt;/div&gt;&lt;div class="ms-clear"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;!--PE: End of READ-ONLY PREVIEW--&gt;&lt;!--MS:&lt;WebPart xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/WebPart/v2"&gt;--&gt;&lt;!--MS:&lt;Title&gt;--&gt;&lt;!--SPM:$Resources:core,ContentEditorWebPartTitle;--&gt;&lt;!--ME:&lt;/Title&gt;--&gt;&lt;!--MS:&lt;FrameType&gt;--&gt;&lt;!--SPM:None--&gt;&lt;!--ME:&lt;/FrameType&gt;--&gt;&lt;!--MS:&lt;Description&gt;--&gt;&lt;!--SPM:$Resources:core,ContentEditorWebPartDescription;--&gt;&lt;!--ME:&lt;/Description&gt;--&gt;&lt;!--MS:&lt;IsIncluded&gt;--&gt;&lt;!--SPM:true--&gt;&lt;!--ME:&lt;/IsIncluded&gt;--&gt;&lt;!--MS:&lt;ZoneID&gt;--&gt;&lt;!--SPM:ImportedPartZone--&gt;&lt;!--ME:&lt;/ZoneID&gt;--&gt;&lt;!--MS:&lt;PartOrder&gt;--&gt;&lt;!--SPM:0--&gt;&lt;!--ME:&lt;/PartOrder&gt;--&gt;&lt;!--MS:&lt;FrameState&gt;--&gt;&lt;!--SPM:Normal--&gt;&lt;!--ME:&lt;/FrameState&gt;--&gt;&lt;!--MS:&lt;Height&gt;--&gt;&lt;!--ME:&lt;/Height&gt;--&gt;&lt;!--MS:&lt;Width&gt;--&gt;&lt;!--ME:&lt;/Width&gt;--&gt;&lt;!--MS:&lt;AllowRemove&gt;--&gt;&lt;!--SPM:false--&gt;&lt;!--ME:&lt;/AllowRemove&gt;--&gt;&lt;!--MS:&lt;AllowZoneChange&gt;--&gt;&lt;!--SPM:false--&gt;&lt;!--ME:&lt;/AllowZoneChange&gt;--&gt;&lt;!--MS:&lt;AllowMinimize&gt;--&gt;&lt;!--SPM:false--&gt;&lt;!--ME:&lt;/AllowMinimize&gt;--&gt;&lt;!--MS:&lt;AllowConnect&gt;--&gt;&lt;!--SPM:true--&gt;&lt;!--ME:&lt;/AllowConnect&gt;--&gt;&lt;!--MS:&lt;AllowEdit&gt;--&gt;&lt;!--SPM:true--&gt;&lt;!--ME:&lt;/AllowEdit&gt;--&gt;&lt;!--MS:&lt;AllowHide&gt;--&gt;&lt;!--SPM:false--&gt;&lt;!--ME:&lt;/AllowHide&gt;--&gt;&lt;!--MS:&lt;IsVisible&gt;--&gt;&lt;!--SPM:true--&gt;&lt;!--ME:&lt;/IsVisible&gt;--&gt;&lt;!--MS:&lt;DetailLink&gt;--&gt;&lt;!--ME:&lt;/DetailLink&gt;--&gt;&lt;!--MS:&lt;HelpLink&gt;--&gt;&lt;!--ME:&lt;/HelpLink&gt;--&gt;&lt;!--MS:&lt;HelpMode&gt;--&gt;&lt;!--SPM:Modeless--&gt;&lt;!--ME:&lt;/HelpMode&gt;--&gt;&lt;!--MS:&lt;Dir&gt;--&gt;&lt;!--SPM:Default--&gt;&lt;!--ME:&lt;/Dir&gt;--&gt;&lt;!--MS:&lt;PartImageSmall&gt;--&gt;&lt;!--ME:&lt;/PartImageSmall&gt;--&gt;&lt;!--MS:&lt;MissingAssembly&gt;--&gt;&lt;!--SPM:Cannot import this Web Part.--&gt;&lt;!--ME:&lt;/MissingAssembly&gt;--&gt;&lt;!--MS:&lt;PartImageLarge&gt;--&gt;&lt;!--SPM:/_layouts/15/images/mscontl.gif--&gt;&lt;!--ME:&lt;/PartImageLarge&gt;--&gt;&lt;!--MS:&lt;IsIncludedFilter&gt;--&gt;&lt;!--ME:&lt;/IsIncludedFilter&gt;--&gt;&lt;!--MS:&lt;ExportControlledProperties&gt;--&gt;&lt;!--SPM:true--&gt;&lt;!--ME:&lt;/ExportControlledProperties&gt;--&gt;&lt;!--MS:&lt;ConnectionID&gt;--&gt;&lt;!--SPM:00000000-0000-0000-0000-000000000000--&gt;&lt;!--ME:&lt;/ConnectionID&gt;--&gt;&lt;!--MS:&lt;ID&gt;--&gt;&lt;!--SPM:g_2bfa6a66_54d1_45e6_84e7_ebbb461f2911--&gt;&lt;!--ME:&lt;/ID&gt;--&gt;&lt;!--MS:&lt;ContentLink xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor"&gt;--&gt;&lt;!--ME:&lt;/ContentLink&gt;--&gt;&lt;!--MS:&lt;Content xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor"&gt;--&gt;&lt;!--ME:&lt;/Content&gt;--&gt;&lt;!--MS:&lt;PartStorage xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor"&gt;--&gt;&lt;!--ME:&lt;/PartStorage&gt;--&gt;&lt;!--MS:&lt;ID&gt;--&gt;&lt;!--SPM:g_a4deccb6_9661_415d_99c8_51f528cf7428--&gt;&lt;!--ME:&lt;/ID&gt;--&gt;&lt;!--ME:&lt;/WebPart&gt;--&gt;&lt;!--ME:&lt;/WebPartPages:ContentEditorWebPart&gt;--&gt;&lt;!--CE: End Content Editor Snippet--&gt;
  </code></pre>
  
  <p>This generates the following code in the .master file:</p>
  
  <pre><code>&lt;WebPartPages:ContentEditorWebPart runat="server" webpart="true" __WebPartId="{B2063517-7C26-4084-AA28-36434C760CDB}"&gt;&lt;WebPart xmlns="http://schemas.microsoft.com/WebPart/v2"&gt;&lt;Title&gt;$Resources:core,ContentEditorWebPartTitle;&lt;/Title&gt;&lt;FrameType&gt;None&lt;/FrameType&gt;&lt;Description&gt;$Resources:core,ContentEditorWebPartDescription;&lt;/Description&gt;&lt;IsIncluded&gt;true&lt;/IsIncluded&gt;&lt;PartOrder&gt;0&lt;/PartOrder&gt;&lt;FrameState&gt;Normal&lt;/FrameState&gt;&lt;Height /&gt;&lt;Width /&gt;&lt;AllowRemove&gt;false&lt;/AllowRemove&gt;&lt;AllowZoneChange&gt;false&lt;/AllowZoneChange&gt;&lt;AllowMinimize&gt;false&lt;/AllowMinimize&gt;&lt;AllowConnect&gt;true&lt;/AllowConnect&gt;&lt;AllowEdit&gt;true&lt;/AllowEdit&gt;&lt;AllowHide&gt;false&lt;/AllowHide&gt;&lt;IsVisible&gt;true&lt;/IsVisible&gt;&lt;DetailLink /&gt;&lt;HelpLink /&gt;&lt;HelpMode&gt;Modeless&lt;/HelpMode&gt;&lt;Dir&gt;Default&lt;/Dir&gt;&lt;PartImageSmall /&gt;&lt;MissingAssembly&gt;Cannot import this Web Part.&lt;/MissingAssembly&gt;&lt;PartImageLarge&gt;/_layouts/15/images/mscontl.gif&lt;/PartImageLarge&gt;&lt;IsIncludedFilter /&gt;&lt;ExportControlledProperties&gt;true&lt;/ExportControlledProperties&gt;&lt;ConnectionID&gt;00000000-0000-0000-0000-000000000000&lt;/ConnectionID&gt;&lt;ID&gt;g_2bfa6a66_54d1_45e6_84e7_ebbb461f2911&lt;/ID&gt;&lt;ContentLink xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" /&gt;
  &lt;Content xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor"&gt;&lt;![CDATA[]]&gt;&lt;/Content&gt;
  &lt;PartStorage xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" /&gt;&lt;ID&gt;g_a4deccb6_9661_415d_99c8_51f528cf7428&lt;/ID&gt;&lt;/WebPart&gt;&lt;/WebPartPages:ContentEditorWebPart&gt;
  </code></pre>
  
  <p><strong>Some more information</strong>:<br>
  I'm pasting the snippets in the HTML file, as indicated. When I add a Web Part Zone snippet, I'm able to add working "Content Editor" WebParts in it. "Web Part Zone" snippets are only available in the Page Layout Snippet Manager though, so I can't use that as a workaround to get the footer in the masterpage to work.</p>
  
  <p><strong>My questions:</strong>  </p>
  
  <ol>
  <li>How can I add a Content Editor WebPart through the Snippet Manager?</li>
  <li>Are there others facing the same problem?</li>
  <li>Is it okay to leave the WebPartID 00000000-0000-0000-0000-000000000000?</li>
  </ol>