Page 2 of 2

Re: Tinymce4 Filemanager not working?

Posted: Fri Aug 11, 2017 6:36 am
by kurtm
I've just upgraded to the latext version of CMSimple with built in TinyMCE4.
I have a dark coloured background on the page and white text. TinyMCE has a white background. While my old stylesheet had a background style specifically for TinyMCE this doesn't work any more and I am unable to find a style either within the TinyMCE4 plugin or elsewhere that will accept a 'background: transparent' style. A local style 'background: #888;' works perfectly but I'd prefer to have the web page background.
Where can I find a style setting that makes TinyMCE background 'transparent'?
Thanks,
Kurt

Re: Tinymce4 Filemanager not working?

Posted: Fri Aug 11, 2017 8:56 am
by manu
https://cmsimpleforum.com/viewtopic.php ... und#p53626
Its in german, but you see the necessary style definitions.
regards
manu

Re: Tinymce4 Filemanager not working?

Posted: Mon Aug 14, 2017 3:37 am
by kurtm
Thanks manu,
Unfortunately the style settings referred to (in German) don't work.
I've been through all my style settings that refer to 'body/#body' styles and 'background:' but the only setting that has any effect is

Code: Select all

.mce-content-body   {background-color: #888;}
However, changing the #888 to 'transparent' disables the style making the background go back to white.
Ofcourse, I could just set the .mce-content-body to the same as the page background, but I'd prefer to have a universal style setting that works on any background.
regards
kurt

Re: Tinymce4 Filemanager not working?

Posted: Mon Aug 14, 2017 11:16 am
by cmb
Usually, the editor runs in an IFrame. Therefore setting the background to transparent won't let the the surrounding page shine through. And frankly, you don't want to fiddle with TinyMCE styles, anyway.

The simplest solution should be to add the following to your template's stylesheet:

Code: Select all

body {background: #888}
This may have some undesired side-effects (and also a slight duplication of styles), but you can go from there. In case you're still having problems, a link to your site might be helpful.

Re: Tinymce4 Filemanager not working?

Posted: Mon Aug 14, 2017 11:32 am
by lck
kurtm wrote:However, changing the #888 to 'transparent' disables the style making the background go back to white.
cmb wrote:In case you're still having problems, a link to your site might be helpful.
Ja genau, zumindest welches Template du verwendest.

Ich vermute, dass in deinem stylesheet.css noch irgendwo für TinyMCE ein background-color oder background definiert ist, in deinem Fall #fff oder white. Suche mal nach #tinymce oder untersuche deine Seite im Edit-Mode mit den Browsertools (Developer-Tools). Rechtsklick untersuchen (Chrome) in anderen Browsern ähnlich. (Nur zur allgemeinen Info: siehe auch hier)

Re: Tinymce4 Filemanager not working?

Posted: Tue Aug 15, 2017 7:34 am
by kurtm
There are no 'background...' styles with #fff or white in my stylesheet.css.
Using the Firefox diagnostic tool I've ploughed through the styles of the '<iframe id="text-ifr" ..' content edit block and other code areas.
Yes, there are background settings in the TinyMCE styles but with testing I couldn't find any that would make the edit block transparent. I tested by turning the backgrounds with #fff to another colour but nothing. I perused classes 'mce-edit-area, mce-container, mce-panel, mce-body, body, #body, etc., etc. but nothing that looked obvious.
Incidentally, I do have an id on the <body statement with an associated style as recommended by Gert back in Dec 2010. However that doesn't set a background colour in the edit frame.
I think I'm going to have to post this problem to the TinyMCE developer's forum.

Thanks for your input and help.

kurtm

Re: Tinymce4 Filemanager not working?

Posted: Tue Aug 15, 2017 9:11 am
by cmb
kurtm wrote:Incidentally, I do have an id on the <body statement with an associated style as recommended by Gert back in Dec 2010. However that doesn't set a background colour in the edit frame.
Well, that's it. Any styles set to body apply to view mode and also to TinyMCE. Any styles set for the id only apply to view mode, but not to TinyMCE.

Re: Tinymce4 Filemanager not working?

Posted: Sat Aug 19, 2017 6:36 am
by kurtm
Thanks Christoph.
In looking through the CSS again I found that there was no background set for 'body'. Appears that the default is white. I have now set both 'body' and the body id to the dark colour and it works. Sorry for any frustration caused.
Kurt

Re: Tinymce4 Filemanager not working?

Posted: Sat Aug 19, 2017 9:15 am
by cmb
kurtm wrote:Appears that the default is white.
Indeed, most browsers default to white background.
kurtm wrote:I have now set both 'body' and the body id to the dark colour and it works.
Great! :)