How to write code in the forums ?
How to write code in the forums ?
Saturday, January 7, 2012 - 08: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.
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
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