Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TinyMCE - external toolbar position

I am trying to work with TinyMCE in creating a multi-textbox, click-to-edit type graphical content editor. I have got TinyMCE to the point where I can add and remove them, position and size them, click to edit them, and so forth - but one thing is bothering me and that is the toolbar.

I have an external toolbar that I'm trying to position along the bottom edge of the page, along with my "Save and Close" button and some other toolbuttons. The external toolbar is created by TinyMCE in a DIV with class "mceExternalToolbar". I tried setting position: fixed and left: and top: attributes in the page stylesheet, but to no avail - TinyMCE sets position: absolute and top: -28px on the DIV when it creates it.

I cannot modify the source code for TinyMCE due to project restrictions, but I can supplement it with extra CSS files.

Can anyone point me in the right direction to get the toolbar positioned properly?

like image 602
Fritz H Avatar asked Apr 06 '09 21:04

Fritz H


People also ask

How do I get rid of powered by tiny?

Use the branding option to disable the “Powered by Tiny” link displayed in the status bar for product attribution.

Is TinyMCE free for commercial use?

Is TinyMCE free? Yes. The TinyMCE core editor is free to use for commercial and noncommercial purposes.


1 Answers

The CSS selectors in the provided stylesheets are overriding the selectors that you're writing. What you need to do is either target the toolbar element with a selector of greater specificity:

body div.mceExternalToolbar {
    position: fixed ;
    top: -28px ;
};

Or use the !important directive to override it:

.mceExternalToolbar {
    position: fixed !important ;
    top: -28px !important ;
}

For more detail about both selector specificity and !important, see the W3C's documentation.

like image 53
Ash Wilson Avatar answered Oct 30 '22 00:10

Ash Wilson