is there Tinymce configuration possible for Umbrac...
# help-with-umbraco
j
is there Tinymce configuration possible for Umbraco 10+ to change the strong tag to a span with class strong on it? This is a requirement for A11Y in a goverment site? or is there a generic solution for doing this? The reason is that currently the strong tag is used by the RTE but is mention in a A11Y report to fix. 😦
bold: { inline: 'span', 'classes': 'bold' },
Copy code
json
"RichTextEditor": {
        "Plugins": [ "visualblocks" ],
        "Commands": [
          {
            "Alias": "visualblocks",
            "Name": "Visual Blocks",
            "Mode": "Insert"
          }
        ],
        "CustomConfig": {
          "statusbar": "true",
          "branding": "false",
          "resize": "true",
          "formats": "{\"underline\": {\"selector\": \"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li\",\"classes\": \"text-decoration-underline\"},\"alignleft\": {\"selector\": \"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img,audio,video\",\"classes\": \"text-start\"},\"alignright\": {\"selector\": \"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img,audio,video\",\"classes\": \"text-end\"},\"aligncenter\": {\"selector\": \"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img,audio,video\",\"classes\": \"text-center\"},\"alignjustify\": {\"selector\": \"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img,audio,video\",\"classes\": \"text-justify\"}}" //https://www.tiny.cloud/docs/tinymce/6/filter-content/#built-in-formats
        }
      },
My config for altering alignments.. and underline for ref..
h
@Johan R. for your specific case you would add this to the RichTextEditor config
Copy code
"CustomConfig": {
          "formats": "{\"bold\": {\"inline\": \"span\", \"classes\": \"bold\" }}",
}
j
@Mike Chambers @huwred thanks! this works!
5 Views