Page 1 of 1

Using CSS with Tinymce 2.2

Posted: Fri Jul 13, 2007 7:44 pm
by musicscore
I know, it's a stupid question and it's telling everybody that I'm a real newby.  :-[
I know there are a lot of post about stylesheets and Tinymce and I read them (took me some hours)  >:(
I know these a Wiki about Tinymce and there's a lot of documentation.  ???
But ......

I CANN'T GET IT WORKING

I want to use the same fonts and layout in the editor of TinyMCE 2.2 as I get on my site

I read I have to put my css in 'Content.css", the stylesheet of Tinymce

I tryed "editor_ui.css", put in my.css but nothing seems to work.

What should I do to get my page fonts (and Css) in the tinymce editor


???????????????

musicscore

Re: Using CSS with Tinymce 2.2

Posted: Fri Jul 13, 2007 8:33 pm
by SimonSchaufi
is there a problem with the module or with the styles?

do you have the stylesheets and templates "connected"?

Re: Using CSS with Tinymce 2.2

Posted: Fri Jul 13, 2007 8:44 pm
by musicscore
No.
How do I connect the templates and stylesheets ?

Re: Using CSS with Tinymce 2.2

Posted: Mon Jul 16, 2007 10:53 am
by musicscore
Hello,

Is someone there ?? Can someone please help me.

Thanx

Musicscore

Re: Using CSS with Tinymce 2.2

Posted: Mon Jul 16, 2007 11:06 am
by cyberman
musicscore wrote: How do I connect the templates and stylesheets ?
You can do it in menu Layout > templates. On right columns there you can found a yellow icon with title CSS inside. Click it and you can attach stylesheets to your template ;).

Re: Using CSS with Tinymce 2.2

Posted: Mon Jul 16, 2007 11:10 am
by musicscore
I have build my complete site with templates and css but the question is ..

When I use TinyMCE (the best editor I know) the styles (expl. Headers -> underline) are not shown in the editor.
On my pages everything works perfect.

Musicscore

Re: Using CSS with Tinymce 2.2

Posted: Mon Jul 16, 2007 1:45 pm
by musicscore
I modifyed my CSS file

I normaly use a css for every block expl

BlockI  h1 {
  font-family : verdana;
  font-color : red;
  etc.
}

BlockII  h1 {
  font-family : courier;
  font-color : green;
  etc.
}


After adding

h1 {
  font-family : verdana;
  font-color : red;
  etc.
}


it shows up in FCKEditorX but still not in TinyMCE 2.2

What is the problem ???

Re: Using CSS with Tinymce 2.2

Posted: Mon Jul 30, 2007 6:17 am
by Ned Nowotny
TinyMCE will only process CSS style sheets where the "Media Type" is explicitly set to "screen".  At least, this was true of the version available in January for CMSMS 1.0.4.  For more information, see:

    Tips on using TinyMCE and CSS Style Sheets

Re: Using CSS with Tinymce 2.2

Posted: Sat Aug 04, 2007 8:46 pm
by Silmarillion
Hmmm, the thing about Tiny only including styles marked as suited for "screen" could probably be changed, would that be better, or does it make sense?

sil.

Re: Using CSS with Tinymce 2.2

Posted: Mon Aug 06, 2007 1:15 am
by Ned Nowotny
At a minimum, stylesheets that have no "Media Type" selected or that have the "all" media type selected should be processed along with "screen" media type stylesheets.  (No selection should correspond to omitting the "media" attribute from "link" or "style" HTML tags.  Because "screen" is the default value for the "media" attribute, the stylesheet should be processed as if "screen" was explicitly selected.)

Then again, styles from all associated stylesheets should be added to the "Style" drop-down menu.  Otherwise, the user needs to edit raw HTML to add styles to the mark-up for "print," "aural," or other media types.  The stylesheet media type is only important for proper WYSIWYG rendering, not HTML editing.

In fact, I'll open a bug report to request that change...

Re: Using CSS with Tinymce 2.2

Posted: Mon Aug 06, 2007 7:56 am
by Silmarillion
cool, I'll get to it as soon as I find the time!

sil.

Re: Using CSS with Tinymce 2.2

Posted: Mon Aug 27, 2007 10:58 am
by musicscore
I cannot get it to work with TinyMCE

I put in the CSS file :

BlockI  h1 {
  font-family : verdana;
  font-color : red;
  etc.
}

BlockII  h1 {
  font-family : courier;
  font-color : green;
  etc.
}

After adding

h1 {
  font-family : verdana;
  font-color : red;
  etc.
}


it shows up in FCKEditorX but still not in TinyMCE 2.2
The stylesheet is set to screen mode but I also tryed the all mode.

When I select heading 1 you do not see the red color for example. Looking at the page, the color is there but not in TinyMCE.


What is the problem  ???