3

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.

  • 1
    Hi 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 Williams Jul 7 '16 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 Gupta Jul 8 '16 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 Reyes Jul 8 '16 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 Gupta Jul 11 '16 at 9:29
1

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

| improve this answer | |
  • Can you add detail (like what XSLT changes?) and mark this as an answer? – Nuno Linhares Sep 11 '16 at 15:24
0

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

| improve this answer | |
0

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.

| improve this answer | |
  • Thanks Rajesh, I am also adding the superscript from the ribbon toolbar but still result is same. Tag is not resolve at front end. – Neha Gupta Jul 12 '16 at 5:20
  • 1
    How you are rendering your RTF Field? Try using ResolveRichText or MvcHtmlString.Create – Rajesh G Jul 12 '16 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.