locked
Including Rich Text Content in CEWP through ONET.XML RRS feed

  • Question

  • HI all,

    I need to include soe formatted text(Bold Text, Coloured Text) to my Content Editor Web Part which was included in Module Tag of ONET.XML. it is taking just Plain Text neither new lines nor rich formatting is being accepted in it. a Sample of my Allwebparts code has been included in this post. Please guide me on how to achieve this rich formatting in ONET.XML

    <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2"
                         xmlns:cewp="http://schemas.microsoft.com/WebPart/v2/ContentEditor">
                            <Assembly>Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
                            <TypeName>Microsoft.SharePoint.WebPartPages.ContentEditorWebPart</TypeName>
                            <Title>Reference Numbers</Title>
                          <FrameType>Standard</FrameType>
                          <cewp:Content>&lt;html&gt;<Text that should be bold>

                          <Text which should be coloured>                                           
                      </WebPart>
                       ]]>

     

    Thanks,


    Thursday, April 7, 2011 7:58 AM

Answers

  • The content in CEWP is HTML, did you try using similar to this <cewp:Content>&lt;b&gt;Hello World! &lt;/b&gt


    --Cheers
    • Marked as answer by Peng Lei Friday, April 15, 2011 3:15 AM
    Wednesday, April 13, 2011 6:18 AM