This question about Using an extension: Answered

Changing FOSWIKI_STYLE_URL in WebPreferences isn't changing TinyMCE behaviour?

I would like TinyMCE to better reflect the changes I've made to the skin I use.

I have all my CSS in single file. According to TinyMCEPlugin, FOSWIKI_STYLE_URL and FOSWIKI_COLORS_URL are passed to TinyMCE.

So, in the WebPreferences topic for the web I'm working with, I
  • pointed FOSWIKI_STYLE_URL to my style file,
  • set FOSWIKI_COLORS_URL to no value, and
  • added both FOSWIKI_STYLE_URL and FOSWIKI_COLORS_URL to FINALPREFERENCES (presumably to lock down the new values in WebPreferences).
But when I edit topics in that web, I still see typical PatternSkin CSS in effect.

I can't find anything in the doc or support stuff, or current task items.

Can someone help me out?

Happy Holidays.

-- FilSalustri - 26 Dec 2009

Hi Fil,

Could you please try the following:
  1. Edit something
  2. View page source
  3. Hunt for a giant meta tag that looks like <meta name="TINYMCEPLUGIN_INIT" content="mode:.../>
  4. Paste the whole meta tag back into this topic

I haven't tried to style TinyMCE myself but I know that MichaelDaum's NatSkin overrides those CSS files to successfully tweak TinyMCE's look.

-- PaulHarvey - 05 Jan 2010

Finally found the time to provide the info. See below for the value of TINYMCEPLUGIN_INIT. I cleaned up the rendering so it would be easier to read.

I note that content_css did not get updated - that is, it doesn't contain the new values of FOSWIKI_STYLE_URL and FOSWIKI_COLORS_URL that I defined in the WebPreferences topic for the web in question.

Any new ideas?

meta name="TINYMCEPLUGIN_INIT"
content="mode:"textareas",
editor_selector : "foswikiWysiwygEdit",
save_on_tinymce_forms: true,
cleanup : true,
theme : "advanced",
convert_urls : true,
relative_urls : false,
remove_script_host : false,
dialog_type: "modal",
extended_valid_elements : "li[type]",
forced_root_block : false,
setupcontent_callback : FoswikiTiny.setUpContent,
urlconverter_callback : "FoswikiTiny.convertLink",
foswikipuburl_callback : "FoswikiTiny.convertPubURL",
save_callback : "FoswikiTiny.saveCallback",
debug:true,
plugins : "table,searchreplace,autosave,paste,safari,inlinepopups,fullscreen,foswikibuttons,foswikiimage",
foswiki_secret_id : "WYSIWYG content - do not remove this comment, and never use this identical text in your topics",
foswiki_vars : { PUBURLPATH : "/t/pub", PUBURL : "http://deseng.ryerson.ca/t/pub", WEB : "Design", TOPIC : "WebPreferences",
ATTACHURL : "http://deseng.ryerson.ca/t/pub/Design/WebPreferences", ATTACHURLPATH : "/t/pub/Design/WebPreferences", 
VIEWSCRIPTURL : "http://deseng.ryerson.ca/t/bin/view", SCRIPTSUFFIX: "", SCRIPTURL : "http://deseng.ryerson.ca/t/bin", SYSTEMWEB: "System" },
theme_advanced_toolbar_align : "left",
foswikibuttons_formats : [
{ name: "Normal", el: "", style: null },
{ name: "Heading 1", el: "h1", style: false },
{ name: "Heading 2", el: "h2", style: false },
{ name: "Heading 3", el: "h3", style: false },
{ name: "Heading 4", el: "h4", style: false },
{ name: "Heading 5", el: "h5", style: false },
{ name: "Heading 6", el: "h6", style: false },
{ name: "VERBATIM", el: "pre", style: "TMLverbatim" },
{ name: "LITERAL", el: "span", style: "WYSIWYG_LITERAL" },
{ name: "Protect on save", el: null, style: "WYSIWYG_PROTECTED" },
{ name: "Protect forever", el: null, style: "WYSIWYG_STICKY" }
],
paste_create_paragraphs : true,
paste_create_linebreaks : false,
paste_convert_middot_lists : true,
paste_convert_headers_to_strong : false,
paste_remove_spans: true,
paste_remove_styles: true,
paste_strip_class_attributes: "all",
theme_advanced_buttons1 : "foswikiformat,separator,bold,italic,tt,colour,removeformat,separator,bullist,numlist,outdent,indent,blockquote,separator,
link,unlink,anchor,separator,undo,redo,separator,search,replace",
theme_advanced_buttons2: "tablecontrols,separator,attach,image,charmap,hr,separator,code,hide,fullscreen",
theme_advanced_buttons3: "",
theme_advanced_toolbar_location: "top",
theme_advanced_resize_horizontal : false,
theme_advanced_resizing : true,
theme_advanced_path: false,
theme_advanced_statusbar_location : "bottom",
keep_styles : false,
content_css : "/t/pub/System/TinyMCEPlugin/wysiwyg_src.css,/t/pub/System/SkinTemplates/base.css,/t/pub/System/FoswikiSiteSkin/style.css,
/t/pub/System/FoswikiSiteSkin/colors.css",gecko_spellcheck : true"
/>

-- FilSalustri - 15 Jan 2010

Well, that is strange. Visited your site (very nice btw!) and copy-pasted your FOSWIKI_STYLE_URL values from WebPreferences, put it into my WebPreferences and it worked.

So something is overriding your FOSWIKI_STYLE_URL. Try searching your entire data/ directory (do a grep).

Edit: Checked your SitePreferences, and you've got FOSWIKI_STYLE_URL and friends listed listed in FINALPREFERENCES. If you want individual webs to override this setting, you must remove it from the FINALPREFERENCES list in SitePreferences.

Because we can inherit settings from DefaultPreferences, SitePreferences, WebPreferences, topic preferences etc. the order of which takes precedence is the same order mentioned in PreferenceSettings

-- PaulHarvey - 15 Jan 2010

Re: my skin mods. Thanks for the kind words Paul.

Re: my problem. Aw, nuts. Right. Makes perfect sense. In my own wiki, the order of preferences runs just the opposite of foswiki; web prefs override site prefs. I keep forgetting foswiki does it the other way round. My bad.

-- FilSalustri - 17 Jan 2010

QuestionForm edit

Subject Using an extension
Extension TinyMCEPlugin
Version Foswiki 1.0.8
Status Answered
Topic revision: r5 - 17 Jan 2010, FilSalustri
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