Jump to content

code box text settings (prettyprint i think)


dean84

Recommended Posts

I have always used code boxes for a number of things, whether it be to show coding, or using the code boxes for actual instruction (in a guide so it seperates them from the random talk you give in a guide)

But this whole prettyprint colouring thing IMO looks really tacky and im currently doing everything i can think of to avoid using them

Is there anychance of getting rid of it?

Link to comment
Share on other sites

No, it's called "prettyprint" as the original poster was referring to.

You could turn it off by editing the replacement code for the bbcode "code" tag. Remove class="prettyprint" from the pre tag. You could also format it in other ways (i.e. add a max width/height with an overflow attribute to force scrollbars if the code snippet is large) if you wanted. It's all configurable via the ACP.

Link to comment
Share on other sites

  • 2 weeks later...

Ok finally got it to work the way i want it too, which is to not allow the use of scroll bars, but to get it wrap the text, took me a while, but i ended up adding a new pre class in the common css file

For those who also dont like the who prettyprint this is what i used

pre.codebox      		{ padding: 5px; background: #f8f8f8; border: 1px solid #c9c9c9; margin-left: 10px; font-size: 11px; line-height: 140%; max-width:100%; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word; }



Then i edited the "code" bb code from using "prettyprint" to "codebox" and it now works like a charm :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...