Copied to clipboard

Flag this post as spam?

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


  • Jason D 75 posts 247 karma points
    22 days ago
    Jason D
    0

    RTE Configuration to Enable Style HTML

    I have been searching, and can't find any information regarding the " html gets stripped out still. I have restarted the app and that still didn't change the behavior.

    Is there anything else I'm missing? Or is it just best to set up all styles using the Text Editor Styling functionality?

    Thank you so much.

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    1 week ago
    Huw Reddick
    0

    Hi,

    What version of Umbraco are you using, and what exactly is being stripped out?

  • Jason D 75 posts 247 karma points
    1 week ago
    Jason D
    0

    I'm on Umbraco 13.4.1. It's stripping out <style /> elements, which I have "style[*]" in appSettings for ValidElements.

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    1 week ago
    Huw Reddick
    0

    Why are you adding style elements in your rte? They do not belong there, they should be in a CSS file or your page header.

  • Jason D 75 posts 247 karma points
    1 week ago
    Jason D
    0

    I appreciate the concern. I do use external Style Sheets as well as for Text Editor CSS, but I have knowledgeable persons that may put up spontaneous temporary landing pages with different designs, and they don't need to be stored in a style sheet, etc. I like the option of the <style /> elements not being stripped out in that case.

    Thank you. Jason

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    1 week ago
    Huw Reddick
    0

    Have you tried setting SanitizeTinyMce to false?

    Also try adding a plus + infront of your style[*]

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    1 week ago
    Huw Reddick
    0

    to allow style tags you need to add the following setting in the RichTextEditor CustomConfig section

        "CustomConfig": {
          "valid_children": "+body[style]",
        }
    
  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    1 week ago
    Huw Reddick
    0

    mmm, seems that doesn't work either!

Please Sign in or register to post replies

Write your reply to:

Draft