Sign Up! Login: Password: New User? Forgot? Support
Code 
 
 
Forums 
Forums : General Discussion > Inserting code snippet
Dethmaul (Member) 9/1/2010 1:35 PM EST : Inserting code snippet
Dethmaul
Posts: 987

0
Like

0
Dislike

I am having trouble with this.

When I add the code to the snippet tool, it works correctly, except it uses a white background instead of our sites default color.

I want it to work with our color scheme, and white is really hard to see, as it then has to be highlighted to see correctly.

I also noticed if I change the background font color by hand using the editor while posting to black (site default) that code is using black font color and THAT text is now blending in.

Any ideas how to get this to work correctly, and still show all the text?

Even if I have to use a special background color, I dont care so long as ALL the fonts show up on that background.

I also noticed that my code box doesnt wrap to fit the screen size, instead it makes you scroll the page left or right.


Site!

TopBottom

Mottie (SuperAdmin) 9/13/2010 4:55 PM EST : Code Snippet Color
ACK!
Mottie
Posts: 3883

0
Like

0
Dislike

Hi Dethmaul!

Because the code block adds inline colors, it is impossible to change the syntax highlighting (different text color for tags/numbers etc), but you can change the overall colors. Add this to your custom CSS (Control Panel > Custom HTML & Script > Custom CSS > CSS Additions to Standard tab) - the "!important" at the end is required.
.recodeBlock { border-color: #777777 !important; }
.reCodeBlock div { background: #333333 !important; }
.reCodeBlock code { color: #999999 !important; }
Adjust the colors (in blue) to match your site.
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

 
 
Key 
New posts No new posts
New posts ( popular ) No new posts ( popular )
New posts ( sticky ) No new posts ( sticky )
New posts ( locked ) No new posts ( locked )
 
 
Who's Online 
There are   members online.
 
 
So-and-so has logged on!
%title%
%message%