<p>Looks like the Redactor <a href="https://imperavi.com/redactor/docs/settings/formatting/#setting-formatting" rel="nofollow"><code>formatting</code></a> config setting only affects what shows up or not from Redactor's default's of <code>['p', 'blockquote', 'pre', 'h1', 'h2', 'h3', 'h4', 'h5']</code>.</p>

<p>Can't say whether that's a bug or intended behavior, but you could probably set the defaults to empty <code>[]</code>, then add them back in the order you want with <a href="https://imperavi.com/redactor/docs/settings/formatting/#setting-formattingAdd" rel="nofollow"><code>formattingAdd</code></a>.</p>

CC BY-SA 3.0
2016-03-16T19:00:14.757Z
That works. I usually set `formatting` to `['p', 'blockquote']` and add my headings with `formattingAdd`.
carlcs
CC BY-SA 3.0
2016-03-17T12:56:08.920Z
@carlcs Have you got a code sample for using formattingAdd in this way? I'm not having much luck with mine for some reason?
John
CC BY-SA 3.0
2016-03-17T12:58:40.830Z
@John the example in the `formattingAdd` doc doesn't work for you?
carlcs
CC BY-SA 3.0
2016-03-17T13:01:13.070Z
@carlcs No! I'm trying: formattingAdd: [
    {
      "title": "h3",
      "tag": "h3",
      "class": ""
    } - but it's erroring out the js in the entry form.
John
CC BY-SA 3.0
2016-03-17T13:16:14.083Z
@carlcs Looks like the syntax is different than i thought. All working now though, thanks!
John
CC BY-SA 3.0
2016-03-16T18:21:21.837Z
2016-03-16T19:00:40.150Z
2016-03-16T19:00:40.150Z
Brad Bell
<p>Here's what I get with a redactor JSON config.</p>

<p><a href="https://i.sstatic.net/DXFxk.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DXFxk.png" alt="Redactor config examples"></a></p>

CC BY-SA 3.0
2016-03-16T18:32:39.137Z
2016-03-16T18:32:39.137Z
Elliot Lewis
<p>I'm trying to adjust the order of the options in the formatting dropdown menu in the Redactor ii fieldtype but it's not picking up my changes. I have made other changes in this config that have been picked up and working, just not this one.</p>

<p>See below for my Standard.json config file.</p>

<pre><code>{
    buttons: ['format','bold','italic','lists','link','file','image','video'],
    plugins: ['fullscreen','video','table','source'],
    formatting: ['h3', 'p', 'blockquote', 'pre', 'h1', 'h2', 'h4', 'h5'],
    toolbarFixed: true
}
</code></pre>

CC BY-SA 3.0
2016-03-16T15:40:06.657Z
Works for me. It depends what you're trying to reorder. Changing the order of the buttons array works, but plugins seem to appear randomly.
Elliot Lewis
CC BY-SA 3.0
2016-03-16T15:50:37.613Z
@ElliotLewis In the config above, i have set the h3 tag to be first, but when the field is rendered, the options haven't changed order at all. Are you saying that your formatting options are in the order as above?
John
CC BY-SA 3.0
2016-03-16T18:33:16.393Z
I can't add an image to a comment so posted below.
Elliot Lewis
CC BY-SA 3.0
2016-03-16T19:09:47.100Z
@ElliotLewis OP is talking about the "Format" dropdown. And buttons added from a plugin are positioned with the [`addAfter`](https://imperavi.com/redactor/docs/api/button/#api-addAfter) API.
carlcs
CC BY-SA 3.0
2016-03-17T09:18:48.540Z
@carlcs Ah sorry, a good answer to the wrong question! I've up-voted the right answer.
Elliot Lewis
<redactor>
Adjust the config to change the order of the formatting menu in Redactor II
# Adjust the config to change the order of the formatting menu in Redactor II

(Asked by: username_0 on 2016-03-16)

I'm trying to adjust the order of the options in the formatting dropdown menu in the Redactor ii fieldtype but it's not picking up my changes. I have made other changes in this config that have been picked up and working, just not this one.
See below for my Standard.json config file.
{
    buttons: ['format','bold','italic','lists','link','file','image','video'],
    plugins: ['fullscreen','video','table','source'],
    formatting: ['h3', 'p', 'blockquote', 'pre', 'h1', 'h2', 'h4', 'h5'],
    toolbarFixed: true
}

**Tags:** redactor
> **Comments:**
> **username_1**: Works for me. It depends what you're trying to reorder. Changing the order of the buttons array works, but plugins seem to appear randomly.  
> **username_0**: @ElliotLewis In the config above, i have set the h3 tag to be first, but when the field is rendered, the options haven't changed order at all. Are you saying that your formatting options are in the order as above?  
> **username_1**: I can't add an image to a comment so posted below.  
> **username_2**: @ElliotLewis OP is talking about the "Format" dropdown. And buttons added from a plugin are positioned with the [`addAfter`](https://imperavi.com/redactor/docs/api/button/#api-addAfter) API.  
> **username_1**: @carlcs Ah sorry, a good answer to the wrong question! I've up-voted the right answer.  

---

## 2 answers

### Answer by username_3 on 2016-03-16. Score: 3 | Accepted answer

Looks like the Redactor [`formatting`](https://imperavi.com/redactor/docs/settings/formatting/#setting-formatting) config setting only affects what shows up or not from Redactor's default's of `['p', 'blockquote', 'pre', 'h1', 'h2', 'h3', 'h4', 'h5']`.

Can't say whether that's a bug or intended behavior, but you could probably set the defaults to empty `[]`, then add them back in the order you want with [`formattingAdd`](https://imperavi.com/redactor/docs/settings/formatting/#setting-formattingAdd).

> **Comments:**
> **username_2**: That works. I usually set `formatting` to `['p', 'blockquote']` and add my headings with `formattingAdd`.  
> **username_0**: @carlcs Have you got a code sample for using formattingAdd in this way? I'm not having much luck with mine for some reason?  
> **username_2**: @John the example in the `formattingAdd` doc doesn't work for you?  
> **username_0**: @carlcs No! I'm trying: formattingAdd: [     {       "title": "h3",       "tag": "h3",       "class": ""     } - but it's erroring out the js in the entry form.  
> **username_0**: @carlcs Looks like the syntax is different than i thought. All working now though, thanks!  

---

### Answer by username_1 on 2016-03-16. Score: 0

Here's what I get with a redactor JSON config.

[![Redactor config examples](https://i.sstatic.net/DXFxk.png)](https://i.sstatic.net/DXFxk.png)


---

