How to add a content editor web / ContentEditorWebPart part via your onet.xml or elements manifest

<AllUsersWebPart WebPartZoneID="TopZone" WebPartOrder="2">
	<WebPart xmlns:xsi="" xmlns:xsd="" xmlns="">
        <Title>Web part title</Title>
        <Description>Web part description</Description>
        <Assembly>Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
        <ContentLink xmlns="" />
        <Content xmlns="">
         &lt;div class=&quot;ms-sblink&quot;&gt;
           &lt;a href=&quot;javascript:HelpWindowKey('how_content_is_searched')&quot;&gt;
        <PartStorage xmlns="" />

The important part here is to remember to html encode the Content element. You can encode html online using this handy website:

Tagged , , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: