Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2006-08-11 10:33:45

golio
New member
Registered: 2006-08-11
Posts: 2

How to change the background color ?

Hi,

My site has a black background, and it will be more convenient if Xinha could also have a black background (WISIWIG).

I have tried to play with the htmlarea.css file but with no luck.

Anyone has any clue ?

Thanks,

Offline

#2 2006-08-11 10:56:41

mokhet
Xinha Authority
From: Paris, France
Registered: 2005-04-03
Posts: 105
Website

Re: How to change the background color ?

the easiest imo is to create your css file, let's say /css/mystyle.css with all your css stuff (body background, default font, default margins, etc) then, when initializing Xinha, it just needs to play with the config.pageStyleSheets variable

I'm assuming here you are generating Xinha as stated in the newbie guide,

In step 5

xinha_editors.myTextArea..config.pageStyleSheets = ['/css/mystyle.css'];

Offline

#3 2006-08-11 12:07:04

golio
New member
Registered: 2006-08-11
Posts: 2

Re: How to change the background color ?

Thanks for your answer, but what is the CSS selectors which is controlling the background color ?

I already tried (with IE and Firefox) to set:

.htmlarea { background-color:black;}

and many other selectors but with no luck.

But, if I change ".htmlarea .toolbar .button " then the background of my buttons are black. So I suppose that my problem is more to find the right selector rather than loading the css file.

Hope there is a solution...

Offline

#4 2006-08-11 15:46:33

junkwarrior
Xinha Community Member
Registered: 2006-03-12
Posts: 14

Re: How to change the background color ?

I think it is body .

Offline

#5 2006-08-11 18:30:34

mokhet
Xinha Authority
From: Paris, France
Registered: 2005-04-03
Posts: 105
Website

Re: How to change the background color ?

there is no way to control the css inside the editor content from the file htmlarea.css. You can give up to trying to make it work this way, you can't because it is two differents documents.

just try what i've told you, and as junkwarrior said, it is the body selector. I can make an example if you dont manage to make it work.

It's that simple :

- create you css file, let's name it /css/mystyle.css
- in this file, you write

body { background-color:black; color:white; }

- then, xinha_editors.myTextArea.config.pageStyleSheets = ['/css/mystyle.css'];
- where myTextArea is the name of your original textarea (or the id, can't remember right now)

And that's it, your background content is black

I can make you an example if you dont manage to do it.

Offline

Board footer

Powered by FluxBB