How to adjust TinyMCE *-init.js
Posted: Sun Nov 01, 2020 10:09 pm
Recently I have succeeded adjusting the *-init.js by:
I want to continue by another group of formats, e.g.Whatever way I insert this code block, either the editor toolbar disappears or only the last inserted block is visible.
How shall it be done?
I expected to see both lists in the Formats dropdown like:
Bootstrap >
- col-md-1
- ...
- col-xs-12
Animation Classes >
- bounce
- flash
- pulse
Code: Select all
{ //start of ini file
...
style_formats: [{ // start of Bootsrtap selectors
title: 'Bootstrap',items: [{
title: 'col-md-1', selector: '*', 'classes': 'col-md-1'},{
...
title: 'col-xs-12', selector: '*', 'classes': 'col-xs-12'
}] // end of Bootstrap selectors
}] // end of formats
} // end of init
Code: Select all
title: 'Animation Classes',items: [{
title: 'Attention Seekers',items: [{
title: 'bounce', selector: '*', 'classes': 'ani_bounce'},{
title: 'flash', selector: '*', 'classes': 'ani_flash'},{
title: 'pulse', selector: '*', 'classes': 'ani_pulse'
}] // end of Attention Seekers
}] // end of Animation Classes selectors
How shall it be done?
I expected to see both lists in the Formats dropdown like:
Bootstrap >
- col-md-1
- ...
- col-xs-12
Animation Classes >
- bounce
- flash
- pulse