Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ault Nathanielsz 87 posts 407 karma points c-trib
    Apr 20, 2020 @ 09:01
    Ault Nathanielsz
    1

    RTE span - lang attribute

    Is there are second config of some kind for the RTE?

    I have enabled lang attributes for <span> in tinyMceConfig. (,span[class|lang],)

    If I:

    • view source (<> button) in an editor
    • add <a lang="en"> and <span lang="en">
    • submit...

    the <a> tag retains the attribute but the <span> has it stripped out!?!

    Any thoughts? It works fine in tinyMCE fiddles, so I'm fairly certain it is an Umbraco issue.

  • Alex Skrypnyk 6168 posts 24148 karma points MVP 8x admin c-trib
    Apr 20, 2020 @ 18:13
    Alex Skrypnyk
    0

    Hi Ault,

    Did you restart the app after tinyMceConfig change?

    Alex

  • Ault Nathanielsz 87 posts 407 karma points c-trib
    Apr 21, 2020 @ 09:17
    Ault Nathanielsz
    101

    Restarting was not the issue.

    Top tip: touching the web.config works as an easy restart.

    The problem eventually boiled down to: the valid elements configuration string was not working as advertised. Even though I had explicitly allowed spans to have the lang attribute, this was not being honored.

    Solution: By adding @[lang] (allows this attribute for all elements) at the beginning of the valid elements configuration string, the rte stopped stripping it out.

    NB: this was discovered by wiping the string down to it's opening and closing tags, then adding @[lang], then, once that worked, adding the rest of the string back in.

Please Sign in or register to post replies

Write your reply to:

Draft