Intermittent showing of styles in TinyMCE editor

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
Anastasis

Intermittent showing of styles in TinyMCE editor

Post by Anastasis »

I am using the TinyMCE editor and when I add a page using one template the Styles combo is populated with styles from the CSS associations (two stylesheets) for that template.

However, with another template, no styles from the associated CSS stylesheets (again two of them, but different stylesheets) are listed in the Styles combo - it is empty apart from the default "-- Styles --" label.

I have checked the {stylesheet} tag is in the head section of the template and anyway, the page displays correctly style-wise when previewed showing it is reading the stylesheets (they are also listed in the source). So why are the available styles not showing in TinyMCE?

I am confused.  :(

Thanks in advance for any help on this.
alby

Re: Intermittent showing of styles in TinyMCE editor

Post by alby »

Anastasis wrote: However, with another template, no styles from the associated CSS stylesheets (again two of them, but different stylesheets) are listed in the Styles combo - it is empty apart from the default "-- Styles --" label.
Have you CSS ID only in this stylesheet?
Tinymce display CSS class only.

Alby
Anastasis

Re: Intermittent showing of styles in TinyMCE editor

Post by Anastasis »

alby wrote: Have you CSS ID only in this stylesheet?
Tinymce display CSS class only.
Alby - Many thanks for your reply. I have both ID and class styles in the stylesheet. I even put a test class style at the start

.teststyle {
  font-weight: bold;
}

thinking that may be the cause as the class styles are further down, but that made no difference.
Anastasis

Re: Intermittent showing of styles in TinyMCE editor

Post by Anastasis »

OK, I have finally managed to resolve this issue.

It happens when the "All" option in the Stylesheet media types is checked. Unchecking it and checking "Screen" instead fixed it.

Seems like a bug - should that be reported somewhere?

I hope this helps anyone experiencing the same.
groinko

Re: Intermittent showing of styles in TinyMCE editor

Post by groinko »

I've had the same problem and I've solved it, as you did, by checking "screen" in my stylesheet options.
A good resume : http://forum.cmsmadesimple.org/index.ph ... 49043.html

BUT...
when I apply a style it seems to be ok, but having a look at the html source code :

Code: Select all

<span class="teststyle" class="teststyle">Hello world</span>
the class is wrritten twice !?!?
Last edited by groinko on Tue May 22, 2007 11:01 pm, edited 1 time in total.
iandunn
New Member
New Member
Posts: 6
Joined: Mon Jul 13, 2009 4:49 pm

Re: Intermittent showing of styles in TinyMCE editor

Post by iandunn »

I had the same problem, but the sheet was already set as only "screen." When I checked "all" it fixed one page, but broke another.
Last edited by iandunn on Mon Jul 13, 2009 5:41 pm, edited 1 time in total.
iandunn
New Member
New Member
Posts: 6
Joined: Mon Jul 13, 2009 4:49 pm

Re: Intermittent showing of styles in TinyMCE editor

Post by iandunn »

Another thing to keep in mind is that CSS selectors are case-sensative, and for some reason CMSMS transforms them to lowercase in the editor, so you need to make sure that you declare them in lowercase in your stylesheet.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Intermittent showing of styles in TinyMCE editor

Post by Dr.CSS »

All html and css should be in lower case, imho...
Locked

Return to “Layout and Design (CSS & HTML)”