Page 1 of 2

Style Classes Not Showing in Editor

Posted: Wed Aug 23, 2006 2:24 am
by mrk
For some reason i am not able to assign styles In my text editor.
Image

I need to be able to do this so the client can get images to float:right; like this
http://www.atlanticrealestateservices.c ... _mccormick
with out having to go into the source to assign the class.

I know this can be done i have other clients using CMSMS and are able to do this.


Any help on this would be extremely appreciated.

~mRk

Re: Style Classes Not Showing in Editor

Posted: Wed Aug 23, 2006 3:39 am
by sydneysunshine
What version of CMS MS and fck editor are you running?

Re: Style Classes Not Showing in Editor

Posted: Wed Aug 23, 2006 3:40 am
by Elijah Lofgren
This should work:
1. Upgrade to latest CMSMS 1.0 beta (beta6 should come out tomorrow).
2. Go to Extensions » FCKeditorX
3. Check the box next to "Import all styles".

Hope this helps,

Elijah

Re: Style Classes Not Showing in Editor

Posted: Sat Nov 04, 2006 10:27 am
by KoalaBlue
If you don't want ALL styles in your stylesheet to appear in the STYLE dropdown menu in FCKeditor, add them one by one as follows:
  • in CMSMS 1.0.2, go to Extensions | FCKeditor
  • there are 3 tabs in this section - select STYLES
  • copy and past the whole css for each style, e.g.
.page-name {
font-family : Century Gothic, Verdana, arial, Helvetica, sans-serif ;
font-size : 20pt;
font-weight : bold;
text-decoration: none;
padding: 0;
color: #696969;
}
When you're ready, click the UPDATE button.
They should now be visible.

Re: Style Classes Not Showing in Editor

Posted: Sat Nov 04, 2006 8:46 pm
by Dr.CSS
If you use the tinyMCE editor Module it will import all the styling for the template automatically....

Re: Style Classes Not Showing in Editor

Posted: Sat Nov 04, 2006 11:25 pm
by KoalaBlue
Hey Mark, I've just downloaded the tinyMCE editor Module at

http://dev.cmsmadesimple.org/frs/?group ... ase_id=657

Looks great - thanks.

Re: Style Classes Not Showing in Editor

Posted: Wed Nov 15, 2006 6:32 am
by mattandaniel
Hi,

I've been having the same problem with FCK. I've tried editing the fckstyles.xml file and the 'styles' tab in the settings, but to no avail. Anyone have any ideas?

... Using CMSMS 1.0.2 and FCK 1.0.1.

PS: I've tried TinyMCE but it doesn't seem to be quite as slick, plus it uses the page background colour for the text area, which in my case is a dark grey...

Re: Style Classes Not Showing in Editor

Posted: Wed Nov 15, 2006 8:37 am
by Russ
I have the same problem with TinyMCE - not styles - although I can add them in manually??

Russ

Re: Style Classes Not Showing in Editor

Posted: Wed Nov 15, 2006 9:41 am
by WebGirl
I have just installed TinyMCE on a new cmsms site [1.0.2 "Maui"] via Module Manager, made it the default wysiwyg editor [Modules] and this is what it looks like below.  Anyone seen anything like this before???

It's got me baffled ...







[gelöscht durch Administrator]

Re: Style Classes Not Showing in Editor

Posted: Thu Nov 16, 2006 11:35 pm
by cdp
Hi,

I'm new to cmsmadesimple, but learning fast!  CMSMS is really good, but I'm having trouble getting TinyMCE (which I've just installed as it loads much faster, especially for pages with multiple content blocks) to show styles in the dropdown, and also display these styles.

When we talk about 'styles', I assume we are talking about css classes, eg:

Code: Select all

.testimonial-name {
	color:#0089d0;
	font-weight:bold;
	font-size: 0.9em;
	}
I've got these types of classes defined in my template stylesheets, but they don't appear in the style dropdown automatically.  Any ideas?

I can get the style for this example to display in the style dropdown, by putting "tname=testimonial-name" (without quotes) in the General field under Extensions; TinyMCE; CSS Styles.  When I highlight a few words and select the style, I can see it creates a span for the class in the HTML code, however the text doesn't change to the correct colour in the editor itself.  As I said, I've got the class definition into the css file for the template that I've based the page on but it still doesn't work.  Does anyone have any ideas on how to get this to work?

Thanks, Cameron

Re: Style Classes Not Showing in Editor

Posted: Fri Nov 17, 2006 6:11 am
by WebGirl
Hi Cameron,

What you need to do to have your own styles appear in the popdown menu, is to copy and paste only those styles from your stylesheet which you would like to have access to.

The 'class' you have shown above needs to be copied in full, all lines relating to it, and then :

=> go to Extensions / select whichever wysiwyg Editor you've installed
=> paste each style in full, for example:
.normal {
font-family : Century Gothic, Verdana, arial, Helvetica, sans-serif ;
font-size : 10pt;
font-weight : normal;
text-decoration: none;
color: #696969;
}
=> click the UPDATE button
=> go to any of your Pages, and view your TinyMCE Editor

You should see YOUR styles in the first STYLE dropdown list, and the Generic styles in the second FORMAT dropdown list.

Hope this helps,
Cheers
WebGirl

UPDATE :: You're right Cameron, that process worked for FCKEDITOR but not for TINYMCE.  Your solution sounds like a do-able work-around. Cheers! :)


[gelöscht durch Administrator]

Re: Style Classes Not Showing in Editor

Posted: Sat Nov 18, 2006 9:13 am
by cdp
Thanks for getting back to me, but my problems are specific to theTinyMCE module version 2.0.4.  With TinyMCE you don't have the option of pasting in the style in the manner that you describe under the Extensions menu.

Anyhow I've spent hours looking at this and thought I'd share what I've figured out so far...

1.  TinyMCE has a standard css file for formatting the editor.  In my installation the standard CSS can be found at:

Code: Select all

C:\Inetpub\wwwroot\gpcms\modules\TinyMCE\tinymce\jscripts\tiny_mce\themes\advanced\css\editor_content.css
If I add my css classes to this css file, the styles show up in the drop down menu.  I have to refresh my browser (Ctrl - F5) and the styles appear.  Sometimes they might only show up if I clear the CMSMS cache under Site Admin; Global Settings

This isn't ideal as it should be possible to put these classes into your template's css and the styles should appear automatically, but frustratingly they may not always appear.

I checked the code that CMSMS was generating for TinyMCE and found:

Code: Select all

tinyMCE.init({
mode : "exact",
elements : "content_en, top_band_left, heading-image, top_band_right, right_hand_side",
content_css : "http://localhost/modules/TinyMCE/content_css.php?mediatype=screen&templateid=21",
...
When I copied and pasted the content_css url into my browser, I found an error was generated:

Code: Select all

SELECT c.css_text, c.css_id, c.css_name 
FROM cms_css c,cms_css_assoc ac 
WHERE ac.assoc_type='template' 
AND ac.assoc_to_id = 21 
AND ac.assoc_css_id = c.css_id 
AND c.media_type = 'screen' 
ORDER BY ac.create_date
Warning: Cannot modify header information - headers already sent by 
(output started at C:\Inetpub\wwwroot\gpcms\modules\TinyMCE\content_css.php:70) in 
C:\Inetpub\wwwroot\gpcms\modules\TinyMCE\content_css.php on line 118
It looks like a debug echo statement has been left in at line 70, so TinyMCE has been trying to parse the SQL as CSS.  I commented out line 70 of content_css.php

Code: Select all

//echo $sql;
and things are working a lot better!  Note you have to Ctrl-F5 after you make any changes to your template CSS for the style to show up.  Note that your style can't be on a css import file, otherwise it won't show up either.

Thanks, Cameron


 

Re: Style Classes Not Showing in Editor

Posted: Mon Nov 20, 2006 8:36 am
by Russ
Thanks cdp, that does the trick for me ;-) Are you going to submit a bug report / solution? Otherwise it may get missed.

Russ

Re: Style Classes Not Showing in Editor

Posted: Sun Nov 26, 2006 11:17 am
by Silmarillion
I'll add this fix to SVN and do e new release in a couple of days.

Thanks!

sil.

Re: Style Classes Not Showing in Editor

Posted: Sun Nov 26, 2006 5:40 pm
by Russ
Sounds good Silmarillion, what about the other changes and also it does not work (the syle bit) when in news? Worth fixing I think before a release.

Russ