.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
satyapriyanayak
Subhransu Sekhar Jena
abhays
SP
DotnetUser
Post New Web Links

Rich text field showing html code

Posted By:      Posted Date: September 06, 2010    Points: 0   Category :SharePoint
 
I am an end user of Sharepoint. This issue only happens from my computer, not from any other within our organization. What happens is that when I edit an item in Sharepoint that contains a rich text field, HTML code is showing. Like so: <div class=ExternalClassC900CFF4F2BF4312A89133C01A6E3C96> Some text</div> This happens from any web browser. Sharepoint 2007 is used. I have Windows 7 x64. Any idea what is causing this?


View Complete Post


More Related Resource Links

Showing highlighted text (HTML) in calculated field?

  
Greetings all,   We're porting our 2007 list to 2010. In Sharepoint 2007, we used the following Calculated Column code to display a highlight over items that had different statuses:   =IF(Date="","<DIV style='background-color:#ff6666'>Not <b>Yet</b> Set</DIV>", IF(Finalized=TRUE,"<DIV style='background-color:#66ff66'>Finalized</DIV>", "<DIV style='background-color:#fffa91'>Tentative</DIV>"))   When we use this in Sharepoint 2010, it doesn't seem to apply the DIV structure. Any ideas of how we can change our code to make this work? Thanks! --Dave   No matter -- I need to add a code snipped ( http://marijnsomers.blogspot.com/2010/01/write-html-code-in-sharepoint-via.html ) to the page... thanks!

Mission Impossible? Use Javascript to Disable a Multi-Line Rich Text Field

  

Hey Community,

Here's a tough one that I have struggled with and so far have not been able to find an answer for - how do you use Javascript to disable a multi-line rich text field.  I have customized a SP Edit form by adding a CEWP.  In the CEWP I have added the Javascript below (only a partial code sample provided) to disable several fields in the form.  The code works fine for single line text fields but it does not work for multi-line rich text fields.  Any suggestions?

<script language="javascript">
//This runs the function when the form first loads
_spBodyOnLoadFunctionNames.push("lockFields");

//This locks the fields the users should not modify
function lockFields()
{
  var theInputTFTitle = getTagFromIdentifierAndTitle("Input","TextField","Title");
  theInputTFTitle.readOnly = true;
  theInputTFTitle.style.color = 'gray';
  //alert(" Value: " + theInputTFTitle.value);//for testing

   var theInputDDLReplyStatus = getTagFromIdentifierAndTitle("select","DropDownChoice","Reply Status");
  theInputDDLReplyStatus.disabled = true;
  //alert(" Value: " + theInputDDLReplyStatus.value);//for testing

  var theInpu

Extract text from html source code

  
i wan to extract Desired Title,Desired Text and Desired link from Webpage source code and paste in richTextBox1. <a href="/site/show/link/0/type/0">Desired Titl e</a> <a title="&lt;b&gt;Text preview&lt;/b&gt; &lt;br/&gt;Some Text" class="pdtip" href="/site/show/link/0/type/0">Text</a><br />Desired text <br /> <label class="url" for="">http://Desiredlink.com </label> Output: Desired Title Desired Title Desired link How can i do this?

Query Sharepoint list, rich text columns returning HTML tags

  
Hi! So I have an issue that maybe someone of you have encountered as well. I am querying a Sharepoint list and creating a report from the data collected from this list. This all works fine except that one of the columns in this list is of the type "Multiple lines of text" and also supports "rich text" with different fonts, sizes and so on. This has the effect that the text returned from this column is wrapped in HTML tags that specifies how the text should be formatted. Naturally I do not want this HTML code to appear in my report so for now I have used custom code to do a string.replace and replaced for example <div></div> and <br> with "". However, this column also has url references to documents and these links shows up like this "/servername/site/subsite/Gemensamma%20dokument/Mwh.docx">http://servername/site/subsite/Gemensamma%20dokument/Mwh.docx There is some sort of double reference to the document that I guess like the HTML tags are embedded in the answer from the rich text column and this is not so easy to do a string replace on because the url varies with the different document and document names. My question really is if anyone of you have done a similar report that I am doing, and have encountered this fenomen with this sharepoint column and how you did to solve this? I have tried to creat

SharePoint 2010 Rich Text Editor field

  
I want to embed iframe tag in Sharepoint 2010 rich html text editor control, but it is simply remove the tags when i save the content. Please let me know how can i do this?

Reading WPF rich text box content in HTML format

  
Hi, I am using WPF RichTextBox. From that, I am reading the content in RTF format using the following code. TextRange textRange = new TextRange(paramRichTextBox.Document.ContentStart, paramRichTextBox.Document.ContentEnd); MemoryStream msData = new MemoryStream(); textRange.Save(msData, DataFormats.Rtf); //get the data from the selected range //strData = textRange.Text; strData = ASCIIEncoding.Default.GetString(msData.ToArray()); I also found that there is an option called DataFormats.HTML. Hence, I tried using this but ended up with error. Is there any other way to read the content of RichTextBox in HTML format? Thanks in Advance!!! Best Regards, Subalakshmi Vijayarajan.

Rich text editor for Title field in Publishing site

  

I have one French publishing site. I want to set one page title like this: see BOTOX trademark here . To show title like this i need to put tag like Product <sup>MC</sup> . Problem is, if i put above tags in title text box at the time of page creation then page title showing Product <sup>MC</sup> not  like above site.

Help...


Regards, Sandip Patil, .Net,Sharepoint Developer www.worldofsharepoint.com

enhanced rich text html

  

Hi, is there any documentation about what specific html tags and attributes may be generated in rich text and enhanced rich text fields?


my blog - Tea Time with Meowkins

Displaying data from Enhanced Rich Text field

  

Iam using a custom list, one of the column datatype of the list is Multiple lines of text with type of text to allow as Enhanced Rich Text. Users in my site can copy any type of data and paste in that list coulmn. I need to display the list data in a webpart same as how it is copied. But after querying the list iam getting all the Style tags. How to avoid this.

For example, i copied the following text in the coulmn as below:

One advantage of using the SPGridView control in SharePoint-based solutions is that it has been integrated with the cascading style sheets that are built into Windows SharePoint Services 3.0. Also, the SPGridView control is heavily.
But after quering the list while displaying, following is the output iam getting. How to avoid the tags:

<div class=ExternalClass70B2A73EC47547F98E72395A66BC565C><div>One advantage of using the <strong>SPGridView</strong> control in SharePoint-based solutions is that it has been integrated with the cascading style sheets that are built into Windows SharePoint Services 3.0. Also, the <strong>SPGridView</strong> control is heavily </div></div>

How to inject htlm code into text field and load it into the view page

  

 Hi to all,


I woul like to ask for advice how to inject HTML code into text field and load it into the view,

I am giving the user the possibility to add/edit text on the page using Text-Box control.


My goal is to let the user add Url link into the page. Example:

The user enter the word "[[About us]]" and the system needs to translate it into

<a href="<%=Url.Action("Details","Page", new{id="About us"}) %>">About us</a>

In the view i am using encoding: Html.Encode(Model.Page.Description).


I can write in the controller a method that will send to the view the correct syntax.

But the view encode all information therefore it's not working.

 

How sould i inject html code into existing text and load it into the view correctly ?

 

Any advice will be appreciated


Thank you


Ori


Background on html/rich text editor in content editor web part?

  

Hi All,

Does anyone know what in the CSS controls the background of the rich text/html editor in the Content Editor Web Part?  Mine is picking up the background of my page layout so I must have accidentally changed it somewhere, I'm just not sure where...

Thanks!
Veronica


Changing a Text field to a Rich Text field

  

Is it possible to change an existing field from a text field to a rich text field?  I see options to change it to an option button, date picker, but rich text isn't available. 

If it's not possible to change the field can a new rich text field be linked to show the info from a previous field?  I created a form for a pilot group and based on feedback want to change fields from text to rich text without losing the information from the previous forms.


Multi-Line, Rich Text Field anomaly

  

When a user clicks on Edit Item for a previously populated and saved List item in SharePoint Services 3.0, the "edit item page" appears but the rich-text multi-line field is blank ... until it is right clicked on in the white space of the multi-line field, then the content that had been previously saved appears.

Should the user fail to right-click in the white space of the multi-line field before saving the List item again, the content previously saved will be saved over as blank. Only recoverable by version control (if enabled for that List).Not tested on

Office XP or Internet Explorer v6.

Versions:
Office Pro 2007
Internet Explorer v8
Windows XP SP3
SharePoint Services 3.0 SP2 CUAug2010

Column Setting:
Append Changes to Existing Text = NO (default)
Specify the type of text to allow = Rich Text

I was able to reproduce the issue on different desktops with different List items on different Sites for both MOSS 2007 and WSS 3.0.  Clearing the browser cache doesnt resolve it.  I've proven it to

Rich text field error in web-form

  

Hi,

I have a few rich text fields in a browser enabled infopath 2010 form. When I tried to submit it an error apppeared.

Retrieving the COM class factory for component with CLSID {52F5D46F-CBEA-4D07-BCB7-7296853F0CF2} failed due to the following error: 80040154. System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {52F5D46F-CBEA-4D07-BCB7-7296853F0CF2} failed due to the following error: 80040154.
at Microsoft.Office.InfoPath.Server.DocumentLifetime.EventRichTextChange.HtmlToCleanXHtml(String html, Boolean makeDomCompatible)

.....

I deleted all rich text fields the form was submitted successfully.

Is this a bug of Infopath 2010? Is any ways to use rich text fields?

 

Best Regards,

Malnor

 


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend