Style Classes Not Showing in Editor

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
mrk

Style Classes Not Showing in Editor

Post 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
sydneysunshine

Re: Style Classes Not Showing in Editor

Post by sydneysunshine »

What version of CMS MS and fck editor are you running?
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: Style Classes Not Showing in Editor

Post 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
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
KoalaBlue
Forum Members
Forum Members
Posts: 39
Joined: Tue Sep 12, 2006 4:23 am

Re: Style Classes Not Showing in Editor

Post 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.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Style Classes Not Showing in Editor

Post by Dr.CSS »

If you use the tinyMCE editor Module it will import all the styling for the template automatically....
KoalaBlue
Forum Members
Forum Members
Posts: 39
Joined: Tue Sep 12, 2006 4:23 am

Re: Style Classes Not Showing in Editor

Post 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.
mattandaniel

Re: Style Classes Not Showing in Editor

Post 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...
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: Style Classes Not Showing in Editor

Post by Russ »

I have the same problem with TinyMCE - not styles - although I can add them in manually??

Russ
WebGirl

Re: Style Classes Not Showing in Editor

Post 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]
Last edited by WebGirl on Fri Nov 17, 2006 6:14 am, edited 1 time in total.
cdp

Re: Style Classes Not Showing in Editor

Post 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
WebGirl

Re: Style Classes Not Showing in Editor

Post 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]
Last edited by WebGirl on Sat Feb 03, 2007 5:01 am, edited 1 time in total.
cdp

Re: Style Classes Not Showing in Editor

Post 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


 
Last edited by cdp on Sat Nov 18, 2006 9:32 am, edited 1 time in total.
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: Style Classes Not Showing in Editor

Post 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
User avatar
Silmarillion
Dev Team Member
Dev Team Member
Posts: 483
Joined: Sun Jan 02, 2005 9:10 pm
Location: Denmark

Re: Style Classes Not Showing in Editor

Post by Silmarillion »

I'll add this fix to SVN and do e new release in a couple of days.

Thanks!

sil.
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: Style Classes Not Showing in Editor

Post 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
Locked

Return to “CMSMS Core”