I tried using [code] and [/code] but that doesn't work. I tried using the Code button but that didn't seem to work either (i.e. past code into editor, highlight, then hit the Code button). So how to add code tags?
BBCode no longer works for new posts, it's all Markdown based now. As far as making a code block, it's a matter of indentation (at least 4 spaces). Presently the code button only pastes an example into the editor if there's no text selected. To paste actual code, you would just paste it in, then select the entire block and hit tab or click the code button.
Another option is wrapping your code in ~~~, which will force a code block without the need for indentation.
I recognize that selecting the code to turn it into a code block is awkward, we're working on making the editor more convenient. ;)
I tried using the Code button but that didn't seem to work either (i.e. past code into editor, highlight, then hit the Code button).
I just tested and it appears to work properly. Can you reproduce the problem consistently with all options described above?
Edited by deceptikon: asdf
Oops! It did work. I just have not gotton used to refreshing the browser after doing something. I just now went back to the thread where I was posting and the code tags worked afterall :)
int nTransistors; char ManID; char Polarity; // populate the above with info now shown here printf("%d %s %s\n", nTransistors, ManID, Polarity);
Edited by Ancient Dragon: testing
Yes! Got ~~~ working :)
You need to put a new line before and after the code block. Unlike vBulletin's bbcode, Markdown is a more universal language used across many sites sich as Reddit, Github, etc. If you do a Google search for markdown tutorial or markdown documentation, you should be able to get a bunch of help.
Well, JMHO in that the new "standard" is fine, but you should still support the old bbcode blocks.
Edited by pritaeas: Removed bbcode.
The preview doesn't support ~~~.
No, it currently doesn't.
Ive been here (and there) for quite some time as a guest
Been wondering - seeing DW with (hardly) no new content from people like Dani or other staff - ...
Hello everyone, I will take this chance to reintroduce myself to the community. I was a member on the Daniweb forums back in 2006 and 2007. I can see a ...
I just posted something and had to go through the "Click the photos with street signs" test before my post was accepted. I was logged in. I don't remember ever ...