How to integrate CSS into php output

4 posts by 3 authors in: Forums > CMS Builder
Last Post: August 15, 2011   (RSS)

Re: [trebien] How to integrate CSS into php output

By Mikey - August 13, 2011 - edited: August 13, 2011

I think this may be what you're looking for, but first back up your wysiwyg.css and wysiwyg.php files.

Then go to:
cmsbuilder / lib / open "wysiwyg.css" and look for the line and add your css styles below that line.

You may need to add the "styleselect" to the wysiwyg in cms builder. To do this go to
cmsbuilder / lib / open "wysiwyg.php" and look for this line theme_advanced_buttons1 : "formatselect,fontsizeselect,bold,italic,underline,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,|,outdent,indent,|,removeformat,fullscreen", and add the "styleselect" to that line like so:
theme_advanced_buttons1 : "formatselect,fontsizeselect,styleselect,bold,italic,underline,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,|,outdent,indent,|,removeformat,fullscreen",

A thread on this as well:
http://www.interactivetools.com/iforum/Products_C2/CMS_Builder_F35/gforum.cgi?post=88950;search_string=wysiwyg.php;t=search_engine#88950

Re: [zick] How to integrate CSS into php output

By trebien - August 13, 2011

Thanks for the info... that's pretty much it.

For anyone else that comes across this post, in a nutshell, you add the custom CSS into the "wysiwig.css" file and RENAME it "wysiwig_custom.css" - also rename the "wysiwig.php" file to "wysiwig_custom.php" and upload them both.

However, now I have a new problem.

My homepage has 2 content areas... one a white background (dark text), and the other dark (with white text). In the editor, when classes are applied to the text in the second section... you can't see it, because the editor is a white background... and the text is changed to white.

So... I need to apply a dark background to that second content area in the editor. Or, at the least, tell the editor to ignore CSS rules when displaying in it in that second section.

Any help? Surely this is a common problem with CSS and the CMS platform, but I've only found information for changing the CSS for the entire editor.

Re: [trebien] How to integrate CSS into php output

By Jason - August 15, 2011

Hi,

You can set a css class that changes the background to black (it sets this in a span tag) and the font color to white. That way you can see what your typing. For example, in wysiwyg_custom.css you can use a class like this:

.whiteTextOnBlackBackground{background-color:black;color:white;}

You can then select this when you need to use it in your wysiwyg editor.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/