Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Toolbar position in inline TinyMCE 4.0

I'm looking into using TinyMCE 4.0 inline and noticed that the toolbar is floating right above the div. I wanted to have it fixed under another toolbar on top of my page with:

position: fixed;
top: 60px;
width: 100%;

This would be a trivial CSS override, if not for the fact that tinyMCE seems to be changing the classes as you scroll. If you scroll the page down while editing inline eventually the toobar will stick to the page top - changing the styling as this happens.

I've looked in the documentation for a simple positioning option, and tried overriding the CSS. Is there something I've missed - or do I really have to start looking into changing the core JS for it to stop fiddling with the classes/styles? Any ideas on how to configure it's position?

like image 924
Christoffer Bubach Avatar asked Jul 17 '26 12:07

Christoffer Bubach


1 Answers

This was fixed in the new 4.0 version but absent when I first tried it in 4.0rc3. They added the editor configuration option:

fixed_toolbar_container: "#css3-selector"
like image 133
Christoffer Bubach Avatar answered Jul 20 '26 02:07

Christoffer Bubach



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!