[solved] WYSIWYG - Custom CSS (CSS Style?)

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
lucid
Forum Members
Forum Members
Posts: 29
Joined: Mon Nov 12, 2007 2:48 pm

[solved] WYSIWYG - Custom CSS (CSS Style?)

Post by lucid »

So I was going to post the question:

How do I customized the WYSIWYG editor to have a different style when editing content but not the actual website style?
e.g. changing the background of the editor to white (when your website may have a black bg-color). I had a look around the advance settings in the extension file and though that "CSS Styles" may help but I couldn't work out how that all worked.

After poking around for a while I found something that did the trick on the TinyMCE wiki that allows one to customize particular css elements to be displayed in the WYSIWYG. Just add this to your css stylesheet.


                EXAMPLE
------------ - - --  ------------ - - --  ------------ - - --
body {
  background: #000;
}

/* TinyMCE specific rule */
body.mceContentBody {
  background: #FFF;
}
------------ - - --  ------------ - - --  ------------ - - --


Hope this helps someone else and saves you a bit of time.
lucid
Forum Members
Forum Members
Posts: 29
Joined: Mon Nov 12, 2007 2:48 pm

Re: [solved] WYSIWYG - Custom CSS (CSS Style?)

Post by lucid »

actually, I'm not sure if the code I posted before will work in that example (it did when I did a 1/2 test) but this was what I actually used:


-- EXAMPLE ---

table, td {border-collapse:collapse;}
.mceContentBody table, td {border-collapse:separate; }

-- EXAMPLE ---
nurzki
Forum Members
Forum Members
Posts: 11
Joined: Wed Jun 11, 2008 1:54 am

Re: [solved] WYSIWYG - Custom CSS (CSS Style?)

Post by nurzki »

Or you can put your CSS under TAB: Extensions/TinyMCE WYSIWYG/Advance

then paste your CSS under "Additions to stylesheet"


this works for me...
Post Reply

Return to “Modules/Add-Ons”