Page 1 of 1

Change sorting in dropdown

Posted: Mon Nov 21, 2016 2:04 pm
by Tata
I want to change the items soring in TinyMCE. Now there is:
Heading 4
Heading 5
Heading 6
Paragraph
DIV
Heading 1
Heading 2
Heading 3
etc.
To follow the logic - first the admin shall write a heading (logically beginning with H1). Then he may start writing articles either in a pargraph or DIV. From this point of view the logic says to start with headings (1 - 6) and continue with other classes.
I don't know the safest way to modify editor's files and which of them shall hold these settings.

Re: Change sorting in dropdown

Posted: Mon Nov 21, 2016 5:18 pm
by cmb
Tata wrote:I don't know the safest way to modify editor's files and which of them shall hold these settings.
This has to be done in plugins/tinymce/inits/init_*.js (it is sufficient to modify only those inits, that are actually used). Just change theme_advanced_blockformats to your liking, e.g.:

Code: Select all

theme_advanced_blockformats : "%PAGEHEADERS%,%HEADERS%,p=p,div=div,code=code,pre=pre,dt=dt,dd=dd",