This question about Configuration: Answered

How to make Foswiki style additions also appear in editor?

What I have
I've successfully made minor CSS additions to make my site match the corporate style guide, most importantly heading colors.
Problem
The TinyMCE editor still has the standard Foswiki headings, not my customizations.
What I want
I want the editor to have the same custom heading styles.

  1. I have not modified the standard Foswiki CSS files, but I have created an additional CSS file that override certain details.
  2. All my changes are in a single, short CSS file.
  3. This CSS file is attached to Main.SitePreferences, and the site preferences also contain:
   * Style customizations:
      * Set USERLAYOUTURL = %PUBURLPATH%/Main/SitePreferences/mycustomstyle.css
      * Set USERSTYLEURL = %PUBURLPATH%/Main/SitePreferences/mycustomstyle.css
      * Set USERCOLORSURL = %PUBURLPATH%/Main/SitePreferences/mycustomstyle.css

The above additions work perfectly for Foswiki, but they are not inherited into the editor. How do I achieve that?

I've searched for help and found this related issue which seems to require that the entire Foswiki style sheets are replaced. I would like to avoid that in order to have minimal upgrade conflicts. Apparently the editor honors the FOSWIKI_STYLE_URL and FOSWIKI_COLORS_URL but not the USERSTYLEURL and USERCOLORSURL.

Can I perhaps just include my custom CSS in the original Foswiki CSS files? If that works, then during upgrades I only need to re-insert the include-statement in the Foswiki CSS files. If this theory is possible, how should I write that include-statement? I am guessing that Foswiki will not interpret the PUBURLPATH macro that I have in the site preferences, so this would not work:
@import url('%PUBURLPATH%/Main/SitePreferences/mycustomstyle.css');

(This installation is a local intranet, so I can't offer you view access.)


The TinyMCEPlugin just pulls in the same stylesheets as are used in the rest of Foswiki; so it ought to work. If the USER*URL styles are not being pulled into the editor, I would regard that as a bug.

-- CrawfordCurrie - 14 Feb 2012

QuestionForm edit

Subject Configuration
Extension TinyMCEPlugin
Version Foswiki 1.0.9
Status Answered
Related Topics
I Attachment Action Size Date Who Comment
mycustomstyle.csscss mycustomstyle.css manage 2 K 01 Oct 2010 - 09:22 TorbenGB Here is a copy of my custom style sheet, for reference.
Topic revision: r2 - 14 Feb 2012, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy