Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForumForumHow best to display code samples in a forum postHow best to display code samples in a forum post
Previous
 
Next
New Post
3/16/2008 9:45 AM
 

Hi,

I am looking for advice on how to configure my forums to best to display code samples.  I think code samples need to display:

  • in a fixed pitch font
  • include the indentation the original author wanted
  • not be subjected to paragraph spacing every time the suthor uses the enter key

I've tried using the html tags <pre></pre> and I added a CSS stye that gave the 'pre' tag a background and a border.  See example at http://www.dynamisys.co.uk/ArticlesDownloads/LeakproofingWindowsApplications/tabid/295/Default.aspx

This gives a satisfactory display format.  The problem is that the FCKEditor makes it really hard to enter and edit the posts.  My procedure is to switch to a raw text box to enter the <pre></pre> tags and to paste the code sample in betweenm them.  When I switch back to rich text view, somtimes the editor does nto display the code sample parts.

Have I missed a far better way fo doing this?

Thanks.


Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
3/17/2008 8:44 AM
Accepted Answer 

/// Type your Code in with the Style Code ///

The Code will viewed as here:

<p><span class="Code">/// Type your Code in with the Stlpe Code ///</span></p>
<p><span class="Code">The code will viewed as here.</span></p>
<p>&#160;</p>

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForumForumHow best to display code samples in a forum postHow best to display code samples in a forum post


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out