1

We have tag like below

<a class="descriptor-link" href="#" data-content-id="descriptor-1" data-toggle="popover" data-placement="auto" data-trigger="manual">test<sup>1</sup></a>

when we are putting it into RTF source tab and coming back to Design, the following attributes are automatically removed:

  • data-content-id="descriptor-1"
  • data-toggle="popover"
  • data-placement="auto"
  • data-trigger="manual"

once we go back to source tab.

I came to know like we need to update the TcmXHTML file at this location Tridion\web\WebUI\Core\Controls\FormatArea\TcmXhtml.

Am I thinking correct and if yes then how I need to update the file to stop these attributes from getting deleted?

1

I'm unsure if the TcmXHTML.config is actually supposed to be a user configurable file, since I don't see it documented. But if you are happy to edit it, changing the default behaviour of the format areas, you can indeed do so, as also is mentioned in the answer here: <abbr> tag inside <a> tag with href as internal component link breaks the html

The change you need to make to support the HTML5 Data Attributes is the following:

drop-proprietary-attributes: false

Please note this will not only allow for the HTML5 Data Attributes, but also leave any additional attribute in the content, specialicaaly when you are pasting from for example MS Word, you might get a whole lot of additional garbage which you might not like.

  • thank you Bart. I think we had some issue with this TcmXHTML.config file on one of our server. We moved the copy of this file from another server on which the RTF was working perfectly and our problem got resolved. We didn't make any change in TcmXHTML.config file – SDLBeginner Nov 30 '16 at 13:58

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.