I have non RTF field in schema wherein superscript tag to be added. I cannot add superscript tag directly in text field. I tried to update the field from non-RTF to RTF field. When I add superscript tag in text field, it shows correctly in the component but when I open page in browser, it shows with html tag .e <sup xmlns="http://www.w3.org/1999/xhtml">(R)</sup>
. It is not resolved.
-
1Hi Neha. Could you add a screenshot of what you're seeing in the 'Source' tab of the component field, along with the HTML source of this part of the published page please? This should help to provide a diagnosis. Thanks.– Jonathan WilliamsCommented Jul 7, 2016 at 13:24
-
Hi Jonathan, Thanks for you reply, Below is the source of: 1) field: The preferred LEED<sup>(R)</sup> Project Lead. 2) Component Source: <subtitle>The preferred LEED<sup xmlns="w3.org/1999/xhtml">(R)</sup> Project Lead</subtitle>. 3) Content on browser : The preferred LEED<sup xmlns="w3.org/1999/xhtml">(R)</sup> Project Lead.– Neha GuptaCommented Jul 8, 2016 at 4:34
-
What happens if you preview the item in the Content Manager Explorer or with the Template Builder? After updating the type of field the next steps including making sure that everything is checked in, the template is handling the text correcting, and that page or Component Presentation is republished.– Alvin ReyesCommented Jul 8, 2016 at 13:35
-
Hi Alvin, Thanks for your reply. We have DD4t implementation. Preview result is : The preferred LEED<sup xmlns="w3.org/1999/xhtml">(R)</sup> Project Lead. Do I need to add some script or code to resolve the tag at front end?– Neha GuptaCommented Jul 11, 2016 at 9:29
3 Answers
Thanks for your suggesstion, by using resolve rich text, issue is resolved now. Also for the RTF field in which superscript value got removed when component save, I have updated the filtering xslt and it resolved the issue.
Thanks, Neha
-
Can you add detail (like what XSLT changes?) and mark this as an answer?– Nuno Linhares ♦Commented Sep 11, 2016 at 15:24
How is the string being rendered in the view?
Perhaps you could try rendering the model field in the following way:
<p>@Html.Raw(Model.Component.Fields["subtitle"].Value)</p>
Source: https://msdn.microsoft.com/en-us/library/gg480740(v=vs.118).aspx
are you adding tag directly in the content tab of your RTF field? If so, please remove them and add it in source tab. Even better don't add the tag manually, simple enter the registered symbol and select it, then make it superscript using option available in ribbon menu.
-
Thanks Rajesh, I am also adding the superscript from the ribbon toolbar but still result is same. Tag is not resolve at front end. Commented Jul 12, 2016 at 5:20
-
1How you are rendering your RTF Field? Try using ResolveRichText or MvcHtmlString.Create– Rajesh GCommented Jul 12, 2016 at 15:59