Click here to Skip to main content
15,879,095 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: (untagged)
I submitted my article from the technical blog, everything is there and I just need to format the code section to be orange/yellow. But I don't see a way of doing it in the editing sections. Any ideas? Thank you.
Posted

Sandwich the code with tag <pre lang="???"/> "Wrap in PRE block" automates it. Be careful using angular brackets, escape them with HTML entities &lt; &gt; when using "allow HTML". Another common mistake is misusing "Ignore HTML in text (good for code snippets)" — un-check it before posting.
Another common problem is wrapping. You should make sure long lines of the code is not wrapped at the right bound of the editing control. Is this rule is observed, source code lines are considered to be reasonable short.

I outlined only how to avoid most common mistakes.

See also: http://www.codeproject.com/info/Submit.aspx[^]. Not all delicate formatted aspects are described in this article. Basically, you need to understand CodeProject escaping and be well familiar with HTML formatting. Pay attention for the chapter "Syntax colourisation".

—SA
 
Share this answer
 
v2
Comments
Sander Rossel 21-Apr-11 2:07am    
Yep, added our answers at the same time. When I started mine there were no answers yet. You give a good answer though. Once again 'slightly' more detailed than mine. My 5 for that too :)
Sergey Alexandrovich Kryukov 21-Apr-11 2:10am    
Thank you,
--SA
Does this article[^] give an answer to all your article writing questions?
Perhaps you want to use pre tags?
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 21-Apr-11 1:53am    
I posted it already (but perhaps added at the same time your were editing your answer, so my 5). This document does not clearly explain some delicate moments, so I explained how to avoid common mistakes, please see.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900