Label in "styles" option in TinyMce 4.2

Vote:
 

Hi!

The toolbar option "styleselect" has changed name to "styles" and with that change in my TinyMCE config the dropdown with my customized formats was shown.

How ever, the label shown in the drop down is the first selectable option, can that be overridden?

This is what the json looks like:

{
      "title": "Stilar",
      "items": [
        {
          "title": "Länk efter text",
          "format": "p",
          "classes": "rte-link"
        },
        {
          "title": "Dokument efter text",
          "format": "p",
          "classes": "rte-document"
        }
      ]
    },
    {
      "title": "Kolumner",
      "items": [
        {
          "title": "Kolumnmarkering",
          "block": "div",
          "wrapper": true,
        },
        {
          "title": "Vänsterkolumn",
          "block": "div",
          "wrapper": true,
        },
        {
          "title": "Högerkolumn",
          "block": "div",
          "wrapper": true,
          "styles": {
        }
      ]
    }

And the dropdown is showing "Länk efter text". I Tiny 3.3.3 the label was "Format" and if I hover the dropdown "Format" is shown as the title.

How can I change the label to be format as well?

Thanks!
/Kristoffer

#301929
May 16, 2023 16:11
Vote:
 

Hi!

If you use "format" Tiny looks for the first tag match and since that often is a p, the "Länk efter text" will be selected.

I changed "format" to "selector" and the a default "Paragraf" is shown in stead.

/Kristoffer

#301970
May 17, 2023 14:05
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.