Trying to inject the below snippet. I do have FCK Editor enabled, not sure if it matter. The css file is in site1/misc but nothing appears on the page

Hello,

I'm adding the following snippet of CSS using CSS Injector

#node-12 {

background-image: url(sites/site1/files/pumpkin-with-kitty);

background-repeat: no repeat;

}

The image is not displaying. Not sure what the issue is.. Help please, or could someone tell me what file I need to put this code in in order for it to work?

Thank You Very Much

Comments

nhoeller’s picture

I ran into a similar issue, which might be related to your problem. I could only get CSS injector working if I either entered the CSS in the plain text editor or clicked on the Source button in FCKeditor. FCKeditor in rich-text mode throws in additional HTML tags.

Even in source/plain text mode, re-editing the CSS snippet adds HTML paragraph tags around the CSS, which again prevents the CSS from loading.

I am runinng Drupal 6.13 with fckeditor plugin 6.x.1.3 and FCKeditor code 2.6.4

dewcansam’s picture

There is a way to disable FCK on the CSS Injector add and edit pages.

1. Go to Administer >> Site Config >> FCKeditor
2. Under "Global Settings"
3. click on the "edit" for the "FCKeditor Global Profile" profile
4. expand "Visibility settings"
5. make sure that "Use inclusion or exclusion mode: " is set to "exclude"
6. under "Paths to exclude/include: "
7. add "admin/settings/css_injector/add"
8. add "admin/settings/css_injector/edit/*"
9. click "Update global profile"

Now FCKeditor won't mess with your css code whenever you add or edit a css injector rule.

p.s. By default FCKeditor changes:

pre.mycode {
  font-family: "Andale Mono", monospace;
  font-size: 1em;
}

into:

<p>pre.mycode {<br />
  font-family: "Andale Mono", monospace;<br />
  font-size: 1em;<br />
}</p>

which essentially breaks what you are trying to accomplish

cocogodiva’s picture

Thank You so much!

onco_p53’s picture

Status: Active » Fixed

Making as fixed. Problem seems to be solved.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.