Remove header background image from text box in FCKeditor

ngaur - April 10, 2009 - 08:03
Project:Colourise
Version:6.x-2.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

When using FCKeditor with this theme, the large background image at the top of the page turns up in every text field that has FCKeditor turned on.

#1

gibbozer - April 10, 2009 - 17:38

This may help -> http://drupal.org/node/394864#comment-1332418
but let me know if it does not work for you.

#2

ngaur - April 11, 2009 - 19:40

Thanks for that, IT put me on the right track, even though It's not usable as is. In the iframe that FCKeditor creates, it doesn't provide a convenient id or class to hang the css on, so I approached things the other way round. I've added an extra class name to the page body in page.tpl.php:

  <body class="XXX <?php print $body_classes ?>">

(I'm actually using my own derivative of your theme, so my class name's not helpful).

I've then modified the file I derived from your css/colourise.css:

body {
  color: #aaa;
  background: #070707 center top no-repeat;
}

body.XXX {
  background: #070707 url(../images/bg.jpg) center top no-repeat;
}

This works for me, and would presumably also work for other editors and for any other iframes people might want to use while still using your css. Ie it's a more general fix than the one you pointed me to.

#3

gibbozer - April 26, 2009 - 18:37
Status:active» closed

Fixed in Colourise-6.x-2.1.

#4

glen201 - July 7, 2009 - 05:03
Component:User interface» Code
Category:bug report» feature request
Status:closed» needs work

Thanks to ngaur for this which helped me to set up colourise with different bg.jpg images.

Use the body in CSS as above for setting up the background image also allows you to specify different backgrounds based upon different pages. For example, in page-taxonomy.tpl.php copied from page-tpl.php, to change the background image for all pages that are based on taxonomy lookups, simply changing the body class from "colourise" to "taxonomy" and then reference a different body.taxonomy CSS entry with a background image for that page.

body {
  color: #aaa;
  background: #070707;
}

body.colourise {
  background: #070707 url(../images/bg.jpg) center top no-repeat;
}

body.taxonomy {
  background: #070707 url(../images/bg-taxonomy.jpg) center top no-repeat;
}

Enjoy.
-- glen

 
 

Drupal is a registered trademark of Dries Buytaert.