2

We have an RTF field which contains User Controls Tags and text as well.

While editing the RTF field using Tridion UI-2012 in the Staging site, it encodes the User Control tags and shows "run at server" code in the Staging site.

We can't uncheck the option "Enable Inline editing" for this field in the Schema as we need to edit text content for this field using Tridion UI-2012.

How can this be solved?

1
  • 1
    Are the controls in the rich text format area before editing? How do authors manage them in the Content Manager Explorer? Aug 27, 2013 at 7:35

3 Answers 3

2

Rich Text Fields are intended for formatting of text including links and images. Basically when you add proper HTML in there it should be sent on to your Published Page correctly, which would also be the case when editing it.

But please note that in the XPM (Experience Manager or UI-2012) view, you don't have a source view like is available in the CME. So it will be impossible to edit these HTML elements in XPM, as they are invisible in the browser.

Also note that ASP.NET Custom Controls are from a SDL Tridion perspective normal HTML elements, but your IIS application server reacts on their runat="server" attribute and executes them (replacing the initial HTML element with something else).

Now XPM will see the changed HTML in your RTF field when editing, and will notice that it differs from the contents of the RTF field as it is saved in the CMS (I'm expecting it will notify you that by saying the preview is not up to date).

Basically having HTML elements in your RTF field which change, is not something XPm can deal with. You would see similar strange behavior when you would add Javascript in yiour RTF field which does a document.write().

1
  • Do you think a "mergefield" or similar pattern work? The RTF could contain a component link, special placeholder text, or a certain class and template logic transforms this to a .NET control. Maybe a component link would be cleanest since it could even be editable in XPM as a link? Aug 28, 2013 at 7:09
0

You can do embed your user control tags in DWT using template callable methods. Pass your rtf field value to the method and return the field value after inserting the user control tag in rtf field value. Hope this will help.

0

We do have user control tags in our templates, but we have not seen this behavior, please check output in Template builder of your Page, if that show &lt; &gt; instead of the < > then there might be issue with your template code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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