Copied to clipboard

Flag this post as spam?

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


  • Julien Kulker 60 posts 325 karma points c-trib
    Aug 12, 2021 @ 09:23
    Julien Kulker
    0

    tinyMce.config Where to find it in Umbraco 9

    Hi all,

    I would like to add some custom configuration to the tinyMCe editor. In Umbraco 8 there is a file config file called tinyMCe. In Umbraco 9 this file doesn't exist.

    So how does it work now in Umbraco 9?

  • Sebastiaan Janssen 5002 posts 15248 karma points MVP admin hq
    Aug 12, 2021 @ 09:48
    Sebastiaan Janssen
    101

    You can explore the configuration options in your appsettings.json file, most IDEs (Rider, VS, VSCode) should give you autocomplete for all the settings like this:

    enter image description here

  • Julien Kulker 60 posts 325 karma points c-trib
    Aug 13, 2021 @ 11:25
    Julien Kulker
    1

    yeah problem is now i can't find the proper documentantion for the customconfig section

  • Sebastiaan Janssen 5002 posts 15248 karma points MVP admin hq
    Aug 13, 2021 @ 11:47
    Sebastiaan Janssen
    0

    Yeah, we never really had a lot of documentation for it to begin with! 😅

    https://our.umbraco.com/Documentation/Reference/Config/tinyMceConfig/index-v7#customconfig

    So only key/value pairs can be put in there.

    I assume it should look like this:

    "RichTextEditor": {
            "CustomConfig": {
              "entity_encoding": "raw",
              "something": "something"
            }
          }
    

    Once you have figured out the notation, it would be awesome if you could help update the docs, if you have some spare time! 🤞

  • ShannonC 6 posts 78 karma points
    Sep 03, 2021 @ 14:40
    ShannonC
    0

    Good morning, Is there some sort of caching that needs to be cleared out for making these settings changes in appsettings? I have yet to be successful with anything. Current code:

    "RichTextEditor": {
        "Plugins": ["textcolor"],
        "CustomConfig": {
          "cleanup ": "false"
        }
    
  • Julien Kulker 60 posts 325 karma points c-trib
    Aug 13, 2021 @ 11:57
    Julien Kulker
    0

    Hi Sebastiaan,

    thank you for your fast reply. Yeah that is what it says. Can only contain a key string value.

    but the old possibilities where like this:

    enter image description here

  • Sebastiaan Janssen 5002 posts 15248 karma points MVP admin hq
    Aug 13, 2021 @ 12:21
    Sebastiaan Janssen
    101

    Oh, nuts! I had forgotten about this.. It probably still works exactly like that but you will need to escape the inner json.

    [\r\n {\r\n \"title\": \"Checkmark List\",\r\n \"selector\": \"ul\",\r\n \"classes\": \"richt-text--checkmarks\"\r\n }\r\n]

    Not sure if the \r\n will work well, they're not really necessary anyway, so then it would become :

    [{ \"title\": \"Checkmark List\", \"selector\": \"ul\", \"classes\": \"richt-text--checkmarks\" }]

  • Sebastiaan Janssen 5002 posts 15248 karma points MVP admin hq
    Aug 17, 2021 @ 08:07
    Sebastiaan Janssen
    0

    Did that help at all Julien?

  • Mahdi Shahbazi 4 posts 79 karma points
    Oct 14, 2021 @ 12:00
    Mahdi Shahbazi
    4

    I configured it like this in appsettings.json and works fine:

    "Umbraco": {
            "CMS": {
               "RichTextEditor": {
                "CustomConfig": {
                  "style_formats": "[{\"title\":\"Headers\",\"items\":[{\"title\":\"Heading h1\",\"block\":\"h1\"},{\"title\":\"Heading h2\",\"block\":\"h2\"},{\"title\":\"Heading h3\",\"block\":\"h3\"},{\"title\":\"Heading h4\",\"block\":\"h4\"},{\"title\":\"Heading h5\",\"block\":\"h5\"},{\"title\":\"Heading h6\",\"block\":\"h6\"}]}]"
                }
              },
            }
          }
    
  • Alexander Wagner 16 posts 124 karma points
    Mar 10, 2022 @ 12:23
    Alexander Wagner
    2

    Is there a way to do this programmatically? The readability is awful if you have a more complex json-string.

  • Jesse Andrews 182 posts 703 karma points
    May 19, 2022 @ 18:08
    Jesse Andrews
    1

    I agree with Alexander that this configuration isn't as user friendly as it could be. One possible solution would be to move control of this to the Grid/Rich text editor data types. The settings wouldn't be global, which is a potential downside (though it could fall back to using the value from appsettings.json), but it would make it possible to have different format options for different instances of the rich text editor. I've posted a feature request for this change here.

  • Mark McDonald 1 post 72 karma points
    5 days ago
    Mark McDonald
    1

    Has anyone found a way to do this NOT in appsettings.json? That is just looking unmanageable.

Please Sign in or register to post replies

Write your reply to:

Draft