Copied to clipboard

Flag this post as spam?

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


  • Klaus Kunath 20 posts 119 karma points
    Feb 24, 2023 @ 08:42
    Klaus Kunath
    0

    RichTextEditor ValidElements does not work

    Hello,

    i try to prevent RTE from deleting <header> and <section> Tags and extend RTE with Plugin "template" with following in appsetting.json without success.

        "RichTextEditor": {
            "ValidElements": "header,section[class]",
            "InvalidElements": "font",
            "Plugins": "template",
            "MenuBar": "insert",
            "Selector": "textarea",
            "Templates": [
                {
                    "title": "Some title 1",
                    "description": "Some desc 1",
                    "content": "My content"
                },
                {
                    "title": "Some title 2",
                    "description": "Some desc 2",
                    "url": "development.html"
                }
            ],
            "Toolbar": "template"
        }
    

    Can anybody help?

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Feb 24, 2023 @ 09:41
    Dave Woestenborghs
    100

    Hi Klaus,

    Is you rich text configuration in the correct place in appsettings.json (see https://docs.umbraco.com/umbraco-cms/reference/configuration/richtexteditorsettings)

    I also think you need to add everything that is added by default by umbraco. If I am correct your config will replace the existing one.

    You can find the default configuration here : https://github.com/umbraco/Umbraco-CMS/blob/33adbf41fa1f5c5d0759c70a7116114107addf56/src/Umbraco.Core/Configuration/Models/RichTextEditorSettings.cs#L10

    Dave

  • Huw Reddick 1932 posts 6722 karma points MVP 2x c-trib
    Feb 24, 2023 @ 19:12
    Huw Reddick
    0

    I'm not sure you can use all those options like Templates either.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies