Copied to clipboard

Flag this post as spam?

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


  • WebTeam 5 posts 85 karma points
    May 31, 2023 @ 09:22
    WebTeam
    0

    V11 Custom buttons in RTE

    We are going through the process of upgrading from Umbraco 7/8 to 11. I need to add custom buttons to the RTE. The way we did it in V8 does not work in V11. Can anyone help please.

    Thanks

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    May 31, 2023 @ 11:32
    Huw Reddick
    100

    Does this help?

     "RichTextEditor": {
        "Commands": [
          {
            "Alias": "codesample",
            "Name": "Code Sample",
            "Mode": "Insert"
          },
          {
            "Alias": "emoticons",
            "Name": "Emoticons",
            "Mode": "Insert"
          },
          {
            "Alias": "forecolor",
            "Name": "Change Color",
            "mode": "Selection"
          },
          {
            "Alias": "fontselect",
            "Name": "Change Font Family",
            "Mode": "Selection"
          },
          {
            "Alias": "fontsizeselect",
            "Name": "Change Font Size",
            "Mode": "Selection"
          }
        ],
        "Plugins": [
          "codesample",
          "emoticons",
          "textcolor",
          "colorpicker"
        ],
        "CustomConfig": {
          "textcolor_map": "[ \"000000\", \"Black\", \"a4b69c\", \"Green\" ]"
        }
      }
    
  • Giampaolo Cutroneo 29 posts 159 karma points
    Jun 12, 2023 @ 14:04
    Giampaolo Cutroneo
    0

    HI, the configuration of the commands works perfectly, but the default color picker keeps appearing to me. The list of colors of the textcolor_map not work. I'm using umbraco 11, latest version.

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jun 12, 2023 @ 14:55
    Huw Reddick
    0

    Yes, color map doesn't seem to work in 11, I'll have a play around see if I can figure out why (seems the font size or font select doesn't work in 11 either)

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jun 12, 2023 @ 15:21
    Huw Reddick
    0

    Hi Giampaolo,

    This looks like either something has changed in 11 or it is a bug, it works perfectly in 10

    enter image description here

  • Giampaolo Cutroneo 29 posts 159 karma points
    Jun 12, 2023 @ 17:11
    Giampaolo Cutroneo
    0

    Hi, after many trials I figured it out. Instead of "textcolormap" it should be specified "colormap":

    "CustomConfig": { "color_map": "[\"#cc0000\", \"Red\",\"#00cc00\", \"Green\"]" }

    This works for me

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jun 12, 2023 @ 17:16
    Huw Reddick
    0

    Mmm that must have changed in U11 according to tinymce it should be textcolor_map which works fine in U10

  • WebTeam 5 posts 85 karma points
    Jun 05, 2023 @ 10:18
    WebTeam
    0

    Yes thanks.

  • Tomasz Kowalski 135 posts 445 karma points
    Jun 09, 2023 @ 08:46
    Tomasz Kowalski
    0

    Hi,

    I can't get it working. I've added this code to appsettings.json, I can see all three new checkboxes in Richtext editor data type, but there is only Change color dropdown visible in editor.

    enter image description here

    enter image description here

    What am I missing???

    Kind regards

    Tomasz

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jun 09, 2023 @ 10:10
    Huw Reddick
    0

    mmm, not sure TBH, I get all three displayed in mine

    enter image description here

  • Tomasz Kowalski 135 posts 445 karma points
    Jun 09, 2023 @ 11:00
    Tomasz Kowalski
    0

    Do I need to specify font sizes? Where this "12pt" comes from in your set-up?

    Tomasz

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jun 09, 2023 @ 14:31
    Huw Reddick
    0

    Where this "12pt" comes from in your set-up

    That's a very good question, I'll check (I didn't add anything that I know of)

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jun 12, 2023 @ 15:43
    Huw Reddick
    0

    Hi Tomasz, I believe those sizes com from TinyMCE, it isn't anything I have done so must be default from TinyMCE

  • Tomasz Kowalski 135 posts 445 karma points
    Jun 14, 2023 @ 09:12
    Tomasz Kowalski
    1

    Yeah... The newest Umbraco uses TinyMCE 6 and there are some "breaking changes":

    enter image description here

    Look here for more: https://www.tiny.cloud/docs/tinymce/6/migration-from-5x/

    It's working now!

    Tomasz

Please Sign in or register to post replies

Write your reply to:

Draft