0

I like how the "code" tag lets you put preformatted text into a case. But it's useful for plenty of things besides code, like log snippets and such, where the syntax highlighting is more annoying than useful. Is there any way to get the same exact thing but without the syntax highlighting?

flag

1 Answer

1

One way would be to adapt this hackcustomization.

If you find the syntax highlighting annoying in general, "disable" it altogether. For instance by defining a customization that overrides all special colors:

name:          Disable code highlighting
description:   Disables any color highlighting of code blocks
author:        Michel de Ruiter
version:       1.0.0.0

css:
span.str, span.kwd, span.com, span.typ, span.lit, span.pun,
span.pln, span.tag, span.atn, span.atv, span.dec { color: black; }

You could also use a HTML <pre> block inside of Rich text mode.

link|flag
You know, I always forget that rich text mode even exists. That'll do the trick, thanks. – rob gwin Feb 13 2012 at 18:24
Actually, I'm not getting this to work well in rich text mode. I switch to rich text mode, paste in my block of text, select the text, and select "preformatted" from the "paragraph format" dropdown. But for some reason that causes the text to go double-spaced. Which I guess should be a bug report about the paragraph format option specifically... but I'm putting it here to show that it doesn't solve my original issue. Nor do I want to disable syntax highlighting altogether on the site.. it is nice when actually pasting code. I just want a way to paste preformatted text that isn't code. – rob gwin Feb 16 2012 at 18:32

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.