Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Encode Html in Page Layout

  Asked By: Marie    Date: Feb 11    Category: Sharepoint    Views: 2857

I have a Rich Text Column that I have included in a page layout.

When I add HTML markup and save the page the markup appears as encoded

Author types: <h1>test</h1>

User Sees:<h1>test</h1>

View Source: <h1>test</h1>

What can I do to the Master Page or Page Layout to have this control
save and render as HTML (much like rich text fields within a list
library does)?



1 Answer Found

Answer #1    Answered By: Faith Delgado     Answered On: Feb 11

If I could remember how to sneak into the code that renders the list
item html  Field correctly I think I would be golden. I don't remember
how. Could it just be the aspx page  layout for list items? Or is this
going to be C# (that I just don't know well yet). I thought I could find
what I was looking for in AllItems.aspx because the same site column
renders the HTML correctly there. AllItems.aspx makes reference to other
code. I'm hoping to find out which control AllItems.aspx uses that
writes <h1> to the page instead of <h1>

Could it be that since I'm using in the display layout  a
SharePointWebControls:NoteField that renders textarea and not a data
control like AllItems.aspx might use (label, or div) that is why it
won't render?

If anybody knows what I might need to override to custom develop a
WebControl that will render  right maybe that is all I need.

Because of what I am integrating (TinyMCE) it has to be a textarea in
the HTML for the TinyMCE.js to find the html element. Other than
displaying after you save, it works beautifully as a Rich text  Editor in
SharePoint and is super-easy to implement.

Didn't find what you were looking for? Find more on Encode Html in Page Layout Or get search suggestion and latest updates.