Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted June 16, 201014 yr 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?
June 16, 201014 yr I like the pretty text but having a way to turn that on and off would prove usefull.
June 16, 201014 yr Not knowing the exact wording or the technical pieces, it's using Google code to generate the [code/php] boxes that you see.
June 16, 201014 yr 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.
June 16, 201014 yr http://google-code-prettify.googlecode.com/svn/trunk/README.html Yes, Google wrote prettify.
June 29, 201014 yr Author 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 usedpre.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 :)
Archived
This topic is now archived and is closed to further replies.