Tuesday, April 17, 2012

Copy your code as HTML In Visual Studio (WYSIWYG)

Have you ever needed to put your code developed in visual studio in your blog or website to share it?
If yes then this blog post is going to share about good  add-on of Visual studio called "Copy As HTML"



Why needed?
  • User can see your code as code format of Visual Studio.
  • Because of HTML user can copy it as text and user in their work easily.
"Copy As HTML" is a lightweight tool developed by Tim Mathias that allows you to copy code from the Code Window and convert it into HTML while preserving syntax highlighting, indentation and background color.

You can download it from here and install that in your system.(You need to restart VS after installation).

Following are simple steps to copy you code as HTML
  1. In the IDE, highlight the code that you want to copy.
  2. Right-click on the selected code.
  3. Click on "Copy As HTML..." on the context menu.


  4. Select the options you want in the settings dialogue.Optionally click "Save As Defaults" so that the Add-in remembers them.Click on OK.

It will generate HTML code so you can put it anywhere now so user can see it in code format and copy that code as well.
Cheers!

No comments: