Wiki: How to Insert a Formatted Code Snippet and Code Block on TechNet Wiki

Wiki: How to Insert a Formatted Code Snippet and Code Block on TechNet Wiki



Inserting human-readable code into your TN Wiki articles adds a lot of value for the reader, but it can be a challenge for the author. Use this article to share how-to information.

How to Use the Format Code Block Tool

The TechNet Wiki Editor has a Format Code Block option ( ). Click it, insert some code, select a language, click Preview to see it, tweak the code, and then click OK. The source code is now formatted and into your article!

To add line numbers on the left side of your code, click the checkbox in the middle, Display Line Numbers.

Clicking the Format Code Block button opens the following popup window. But there is no option to select the Small Basic programming language. See Small Basic: How to Format a Code Block.

Other Code Insertion Options


See Also

Other Languages


This article is also available in other languages:
 
Leave a Comment
  • Please add 3 and 4 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • yottun8 edited Revision 30. Comment: Updated a link of pt-BR version.

  • Ed Price - MSFT edited Revision 28. Comment: Adding links to See Also

  • Ed Price - MSFT edited Revision 26. Comment: Adding images to make this awesomer.  

  • Ed Price - MSFT edited Revision 25. Comment: Headers for TOC. Added TOC.

  • Ed Price - MSFT edited Revision 24. Comment: Added TOC. Making the top section more of an official How To on using the Editor's Code Block tool.

  • yottun8 edited Revision 18. Comment: Added the ja-JP link.

  • Horizon_Net edited Revision 17. Comment: added language tags

  • Ana Paula de Almeida edited Revision 16. Comment: Added: 'Other Languages' and 'Multi Language Wiki Articles' tag  

  • Pronichkin edited Revision 14. Comment: Added Plain Code Box option

  • Pronichkin edited Revision 13. Comment: Added Visual Studio options.

Page 1 of 2 (14 items) 12
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Ed Price MSFT edited Revision 3. Comment: Adding to Wiki how to family.

  • Sean Jenkin MSFT edited Revision 7. Comment: removing the pre tag on the WLW line

  • Ed Price MSFT edited Revision 10. Comment: Title caps and added a horizontal line rule.

  • Sean Jenkin MSFT edited Revision 11. Comment: Updating for the new editor.

  • Pronichkin edited Revision 13. Comment: Added Visual Studio options.

  • Pronichkin edited Revision 14. Comment: Added Plain Code Box option

  • Fantastic article!!

  • Ana Paula de Almeida edited Revision 16. Comment: Added: 'Other Languages' and 'Multi Language Wiki Articles' tag  

  • Horizon_Net edited Revision 17. Comment: added language tags

  • yottun8 edited Revision 18. Comment: Added the ja-JP link.

  • Good Article.

  • Ed Price - MSFT edited Revision 24. Comment: Added TOC. Making the top section more of an official How To on using the Editor's Code Block tool.

  • This article was a pain to find, so I'm putting more of the searched terms in the title like "Code Block" and "Code Snippet".

  • Ed Price - MSFT edited Revision 25. Comment: Headers for TOC. Added TOC.

  • Ed Price - MSFT edited Revision 26. Comment: Adding images to make this awesomer.  

Page 1 of 2 (20 items) 12