Copied to clipboard

Flag this post as spam?

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


  • Jason Picard 4 posts 74 karma points
    May 04, 2022 @ 16:46
    Jason Picard
    0

    Umbraco 9 appsettings.json not working?

    I am trying to make changes to the validElements section here:

    "Umbraco": {
        "CMS": {
          "RichTextEditor": {
            "ValidElements": "+a[id|style|rel|rev|hreflang|dir|lang|tabindex|accesskey|type|href|target|class],-abbr[class|style],-address[id|dir|class|style|aria-*|role|data-*],animate[*],animateMotion[*],animateTransform[*],area[shape|coords|href|alt|target|class],-article[id|dir|class|style|aria-*|role|data-*],-aside[id|dir|class|style|aria-*|role|data-*],audio[class|style|*],-b/-strong[class|style],-bdo[class],-blockquote[id|dir|style|aria-*|role|class],br[class],button[id|class|style|*],canvas[id|class|style|alt|aria-*|role|data-*|width|height|*],caption[id|lang|dir|class|style],circle[*],-cite[class|style],clipPath[*],-code[class|style],datalist[id|class|style|*],dd[id|class|title|style|dir|lang],defs[*],desc[*],-details[id|dir|class|style|aria-*|role|open],-dfn[class],discard[*],-div[id|dir|class|style|aria-*|role|data-*],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang],ellipse[*],feBlend[*],feColorMatrix[*],feComponentTransfer[*],feComposite[*],feConvolveMatrix[*],feDiffuseLighting[*],feDisplacementMap[*],feDistantLight[*],feDropShadow[*],feFlood[*],feFuncA[*],feFuncB[*],feFuncG[*],feFuncR[*],feGaussianBlur[*],feImage[*],feMerge[*],feMergeNode[*],feMorphology[*],feOffset[*],fePointLight[*],feSpecularLighting[*],feSpotLight[*],feTile[*],feTurbulence[*],-fieldset[id|class|style|*],figcaption[class|style],-figure[id|dir|class|style|aria-*|role|data-*],filter[*],foreignObject[*],-form[id|class|style|*],g[*],-h1[id|dir|class|style],-h2[id|dir|class|style],-h3[id|dir|class|style],-h4[id|dir|class|style],-h5[id|dir|class|style],-h6[id|style|dir|class|style],hatch[*],hatchpath[*],hr[class|style],-i/-em[class|style],iframe[id|class|style|alt|aria-*|role|data-*|width|height|loading|src|srcdoc|allow=fullscreen|*],image[*],img[id|dir|lang|longdesc|usemap|style|class|src|alt|width|height|umbracoorgwidth|umbracoorgheight|onresize|onresizestart|onresizeend|rel|data-*],input[id|class|style|*],label[id|class|style|*],-legend[id|class|style|*],-li[id|class|style],line[*],linearGradient[*],map[id|name|class|style|aria-*|role|data-*],marker[*],mask[*],metadata[*],meter[id|class|style|*],mpath[*],-nav[id|dir|class|style|aria-*|role|data-*],-ol[id|class|reversed|start|style|type],optgroup[id|class|style|*],option[id|class|style|*],output[id|class|style|*],-p[id|style|dir|class],path[*],pattern[*],picture[id|class|style|alt|aria-*|role|data-*|width|height|loading|*],polygon[*],polyline[*],-pre[class|style],progress[id|class|style|*],-q[class|style],radialGradient[*],rect[*],-section[id|dir|class|style|aria-*|role|data-*],-select[id|class|style|*],set[*],-small[class|style],source[*],-span[class|style],stop[*],-strike[class|style],-sub[style|class],-summary[id|class|style|aria-*|role],-sup[style|class],-svg[id|class|style|alt|aria-*|role|data-*|*],switch[*],symbol[*],-table[id|class|style|dir|lang|*],tbody[id|class],td[id|lang|dir|class|colspan|rowspan|style|scope],text[*],textarea[id|class|style|*],textPath[*],tfoot[id|class],-th[id|lang|dir|class|colspan|rowspan|style|scope],thead[id|class],title[*],-tr[id|class|style|dir|lang],track[*],tspan[*],-u[class|style],-ul[id|class|style],use[*],video[id|class|style|alt|aria-*|role|data-*|*],view[*]",
    "InvalidElements": "font"},
    

    some HTML tags are being stripped out even though they have been placed in the validElements section as seen in the code above. This is quite frustrating as it is holding us back from further development. We never had this problem in previous versions using .config files.

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    May 06, 2022 @ 09:41
    Dave Woestenborghs
    0

    HI Jason,

    Which html tags are not working ?

    Dave

  • Jason Picard 4 posts 74 karma points
    May 06, 2022 @ 10:38
    Jason Picard
    0

    Hi Dave,

    Thanks for getting back to me about this question. So far we have noticed these tags are being stripped from the HTML upon saving

  • Jason Picard 4 posts 74 karma points
    May 06, 2022 @ 10:39
    Jason Picard
    0

    Sorry I didn't realize I had to place the tags in the code sample area, here are the tags so far.

    <aside>, <nav>, <b>, <i>
    
  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    May 06, 2022 @ 10:45
    Dave Woestenborghs
    0

    Hi Jason,

    I see all these elements in your config starting with a -

    Could that be the issue ? I'm not an expert in tinyMce config.

    Dave

  • Jason Picard 4 posts 74 karma points
    May 06, 2022 @ 11:00
    Jason Picard
    0

    Hi Dave,

    That is exactly what I thought initially, but apparently the - sign has an effect on what attributes can be applied to the tag, not whether the tag is considered valid or not. If the tag is in there it is considered valid. You can include a section in the appsettings.config for InvalidElements as well which allows you to exclude certain tags.

Please Sign in or register to post replies

Write your reply to:

Draft