Font weight control rich text editor Umbraco 13.
# help-with-umbraco
a
How can i add fontweight control in rich text editor? I can find hardly anything about it. I guess it has something to do with configuration in appsettings.development.json but i can't figure it out.
h
check out https://www.iomi.net/tinymce-umbraco/ for some ideas
here is a basic example which adds FW800 and 400 as an example (I added both class and inline style, so you probably want to just add a class)
Copy code
"CustomConfig": {
          "style_formats": "[{\"title\":\"Inline\",\"items\":[{\"title\":\"FW-800\",\"inline\":\"span\",\"attributes\":{\"style\":\"font-weight: 800;\",\"class\":\"fw-800\"}},{\"title\":\"FW-400\",\"inline\":\"span\",\"attributes\":{\"style\":\"font-weight: 400;\",\"class\":\"fw-400\"}}]}]"
        }
a
@huwred thanks, that makes a lot of sense now, can i somehow add it to already existing default block that comes with umbraco?
h
It should appear on all RTE controls
a
h
yes, you will need to add those to the style_formats as it replaces what is there by default rather than merging them
a
Is there a way to merge them or create additional control within RTE only with my font settings?
h
That I don't know, but don't think so
3 Views