Skip to main content

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password
Register
  • Home
  • Browse
    • 2D Art
    • 3D Art
    • Concept Art
    • Textures
    • Music
    • Sound Effects
    • Documents
    • Featured Tutorials
  • Submit Art
  • Collect
    • My Collections
    • Art Collections
  • Forums
  • FAQ
  • Leaderboards
    • All Time
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
    • Weekly
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
  • ❤ Donate
Feedback

How to write code in the forums ?

shirish
Saturday, January 7, 2012 - 05:53

Hi all, 
I have been trying to understand how to write code (as in what I'm doing in the terminal) in the fora but there seems to be missing a code thing. In many forums there is a way so it would format the code/commands part differently then all the text. Something like this for e.g. 

http://forums.debian.net/viewtopic.php?f=10&t=74482

Any ideas would be appreciated.  

 

 

 

  • Log in or register to post comments
MoikMellah
joined 14 years 4 months ago
Friday, January 20, 2012 - 12:35
MoikMellah's picture

Seems OGA recognizes the <code> element if you insert it with the HTML editor, and uses a fixed-width font:

var thisExample = "This is an example.";
print(thisExample);

Doesn't seem to like me messing with the style directly, though - changing the background or font color would require a CSS edit by Bart or another admin.

-mm

My project: Bits & Bots

  • Log in or register to post comments
shirish
joined 15 years 1 month ago
Saturday, January 21, 2012 - 16:29

Tried it, seems to work, not the HTML editor but you mean the HTML source editor . I added the code link there.

I mean http://opengameart.org/sites/all/libraries/tinymce/jscripts/tiny_mce/the...

$ echo 'this should work'
this should work

I am guessing this would become sweeter. Seems this is the module. https://drupal.org/project/wysiwyg (or this one https://drupal.org/project/tinymce although the former seems much better) and it seems there are people who want to have the code block as I do. See :-

http://groups.drupal.org/node/203568

 

 

 

 

  • Log in or register to post comments