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