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 55 posts 289 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 4964 posts 14965 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 55 posts 289 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 4964 posts 14965 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 55 posts 289 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 4964 posts 14965 karma points MVP admin hq
    Aug 13, 2021 @ 12:21
    Sebastiaan Janssen
    0

    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 4964 posts 14965 karma points MVP admin hq
    Aug 17, 2021 @ 08:07
    Sebastiaan Janssen
    0

    Did that help at all Julien?

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

    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\"}]}]"
                }
              },
            }
          }
    
Please Sign in or register to post replies

Write your reply to:

Draft