Change sorting in dropdown

Questions about how to use the online - editors and suggestions how to improve them
Post Reply
Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Change sorting in dropdown

Post by Tata » Mon Nov 21, 2016 2:04 pm

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.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Change sorting in dropdown

Post by cmb » Mon Nov 21, 2016 5:18 pm

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",
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply