Search code examples
htmlumbracorte

Umbraco: Customising RTE to work with HTML tags


I am using Umbraco 7 CMS to set up a website. Within the pages, I have several RichText Editors that I would like to customise to accept tags (namely the abbr tag).

I googled this, and came across the following instructions;

Editing the tinyMceConfig file to accept new commands, namely umbracoAlias acronym and abbr.

Editing the CDATA to accept new information in the ValidElements section of tinyMceConfig file.

Editing the web.Config in order to force Umbraco to reload.

Selected the new fields (they are visible now in Umbraco when they weren't before) acronym and abbr in the RTE section of the Developer tag. The site now said I should see 2 checkboxes appear on the RTE in order to create inline styles when typing in the RTE.

Reloaded nodes, republished site, logged in and out of Umbraco numerous times but they do not show on the RTE.

Any ideas as to how I can try to fix this? It's really annoying! Thanks a lot.


Solution

  • This is due to TidyHtml and is an unfortunate issue indeed!

    I just ran across the same problem myself and was curious if there has been any update since i answered this question for umbraco4.8 a year ago. I was hoping that it would have been resolved in the releases up to umbraco7, but no luck.

    Umbraco documentation shows /config/umbracosettings.config sections where Tidy can be disabled.
    Heads up that the TidyEditorContent element is no longer in the default instalation of this file but can easily be added back under the content section:

       <content>
            <TidyEditorContent>False</TidyEditorContent>
        <errors>
          <error404>1</error404>
    

    This may not be what you want since by removing this Tidy cleanup - you lose control and introduce potential nastyness... I have just verified that it will allow abbr tags through though.