Copy As HTML

Free

Copy selected code in HTML format while preserving syntax highlighting, indentation and background colour. Options: Max Height, Title Block, Alternating Lines, Line Numbers, Wrap Lines, Un-indent, Background Colour, Class Names. Converts RTF, outputted by VS, into HTML.

(21) Review
Visual Studio
2012, 2010, 2008, 2005
Download (22,050)
5/24/2013
1.9
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (21)
Q and A (28)
Sign in to write a review
Sort by:

by edspace1 | January 28 2014

Please, can you add support for VS2013?

by Guangchun | December 13 2013

Could you please add support for VS2013? Thanks.

by Jon M Curtis | July 31 2013

Did not work to copy from Visual Studio 2012 to OneNote. It added stray characters to whitespace, e.g. '    def __init__(self, data): pass'. I assume that's a defect that will be fixed. But the reason I immediately uninstalled it is because it brings up a settings dialog on every copy operation, and it does not remember the previous settings. So you have to uncheck what you don't want (e.g. line numbers added) every time you do a copy. It would be better if the settings were made seperately instead of having the extra dialog appear every time you want to copy/paste.

by SWheaties | July 07 2013

This is a very nice tool, thank you very much for publishing it.
Is there a way to omit the line numbers from the html such that the user can highlight the code in the html page, copy it, and paste it into visual studio without modification?

Thank you,

Sam

by calf__ | January 21 2013

This tool is very cool,but there is some problem with me~
My vs is Visual Studio 2010(chs),i can not find it in context menu or "Menubar –> Edit" after install

by rahman_mahmoodi | July 14 2012

This is excellent. Love it!!! Keep on the good job!!!

by Özgür SARI | June 28 2012

I really liked this...

by _Witek_ | June 07 2012

Works nicely. It would be useful to be able to add custom title instead of the default Code Snippet.

by Dragan Radovac | April 16 2012

by Patrick Butler Monterde | February 28 2012

Great Application. I would love to see the ability to change the font type in the tool.

by Daniel Kreuzhofer - Consultant | January 15 2012

Great tool. Very simple and just working!

by Patrick Layani | November 17 2011

nice work. very simple to install and use, and do the work perfectly.

by zedubal | October 19 2011

Very nice!

by Jens Vestergaard | September 19 2011

This is a really nice and well done tool.
It's on the top 3 list of tools I install right after Visual Studio is installed on a new computer.
Great job!

by Jason R. Shaver (MSFT) | September 07 2011

Works great, I only wish there was a way to make it the default 'copy' and to have it skip the dialog.

by David Ballantyne | October 12 2010

For anyone who has to write developer documentation, this tool is a must and will save you literally hundreds of hours.

Excellent tool.

Regards

Dave

by Owen1980 | July 05 2010

by Mikhail Brinchuk | April 27 2010

by mkamoski3 | April 12 2010

All -- The "Copy As Html" plug-in is great. It save a lot of time. I highly recommend. Thank you VERY much. -- Mark Kamoski

by Eyal Shilony1 | September 19 2009

5 stars for simple installation, no setup requirements, simplicity, code customizability, and perfection. :)

1 - 20 of 21 Items   
Sign in to start a discussion


  • VS 2013?
    1 Posts | Last post January 07, 2014
    • Any idea when this will work on 2013? Or what the steps would be to see if it will work on 2013?
  • Can't turn off line numbers
    3 Posts | Last post October 25, 2013
    • Hi Tim:
      
      Even when I uncheck the box for "Line Numbers", the tool still inserts them in the copy, with the line numbers inserted to the left of the margin in the target.
      
      Can this be fixed?
      
      Thanks,
      Noel C. Gordon
      
      
      
       
    • Hi Noel,
      
      Thanks for letting me know about that problem.
      
      As a quick workaround, try deselecting “Alternating Lines” as well as deselecting “Line Numbers”, but you will loose alternating lines.
      
      A more complex fix which would allow to keep alternating lines is to select “Use Class Names” and type “le-cah-container-no-numbers” for the “Container” then define the following rule in the stylesheet:
      
      .le-cah-container-no-numbers li
       {
           list-style-image:  none;
           list-style-position:  outside;
           list-style-type:  none;
       }
      
      Ideally I need to improve the programme logic, but I don’t currently have access to VS2012.
      
      Hope that helps,
      Tim.
      
    • Here is the complete stylesheet. I’ve capitalised the rules needed to remove the line numbers. You can customise the other rules to suit.
      
      .le-cah-titleblock
      {
      	background: #000080;
      	color: #ffffff;
      	font-family: Verdana, Tahoma, Arial, sans-serif;
      	font-size: 10pt;
      	font-weight: bold;
      	padding: 2px 5px;
      }
      
      .le-cah-container-no-numbers ol
      {
      	border: #000080 1px solid;
      	color: #000000;
      	font-family: Consolas, 'Courier New', Courier, Monospace;
      	font-size: 10pt;
      	MARGIN: 0;
      	PADDING: 0;
      }
      
      .le-cah-container-no-numbers li
      {
      	list-style-image: none;
      	list-style-position: outside;
      	LIST-STYLE-TYPE: NONE;
      	margin: 0;
      	padding: 2px 5px;
      }
      
  • "Â" in the pasted text
    2 Posts | Last post October 19, 2013
    • Hi, Thanks for excellent tool!
      
      I think I may have some kind of encoding issue.
      
      Code Snippet
      72.	<div>
      73.	Â Â Â Â <span>
      74.	Â Â Â Â Â Â Â Â <asp:Label ID="Label5" runat="server" Text="Date of Birth:" AssociatedControlID="DOB"></asp:Label>
      75.	Â Â Â Â </span>
      76.	Â Â Â Â <div class="answerList">
      77.	Â Â Â Â Â Â Â Â <asp:TextBox runat="server" ID="DOB"></asp:TextBox>
      78.	Â Â Â Â Â Â Â Â <span>DD/MM/YYYY</span>
      79.	Â Â Â Â </div>
      
      What's all the Â? I think something is messing with the encoding, I'm copying over RDP from VS2010/win2008r2 with Copy as HTML 1.9.0.0 into Word 2010/xp.
      
      I found your tool and used it quite happily on a different system, but found this on a vs2012/windows8 laptop I was trying out, so I was surprised to find it on a more widepread platform.
      
      Any ideas about where to start sorting this out?
      
      Thanks
      
      David
    • Hi David,
      
      Thanks for the compliments and for letting me know about the problem. A few people have reported it. It works fine on a lot of systems but not on others. Unfortunately I don’t currently have access to VS2012 so I can’t fix it.
      
      As you suggest it could be a problem with the encoding. I’ve encoded the NBSP as \xa0. May be it should be \x00a0 or convert it to HTML character entities &#160; or &#nbsp; .
      
      Would anyone be willing to have a look at it? I could send you the source code.
      
      And people have made good suggestions for improvement so anyone who wants to code them is welcome?
      
      Cheers,
      Tim.
      
  • VS2012 Ultimate No Right Click Context Menu Entry
    3 Posts | Last post October 09, 2013
    • I've installed your tool and uninstalled it about half a dozen times now. I can see the assemblies on the disk in the appropriate places, but I do not get a right click context menu entry. Any ideas what to try next? I do have Resharper installed, so the context menu is already 'large'.
    • After installation, the tool does not appear in the Extensions and Updates dialog as an installed tool.
    • I developed it for the Professional edition of Visual Studio. Microsoft does things a little differently in the other editions so it might not work with these.
  • Visual Studio 2012 Version?
    2 Posts | Last post August 30, 2013
    • This tool looks awesome. I would love to use it but I work in Visual Studio 2012. Do you happen to have any plans to make it available for 2012? Thanks!
    • its working in 2012
  • The parameter is incorrect error
    1 Posts | Last post August 07, 2013
    • Hi, would like to report a problem.
      
      Just installed the plug-in. If I use "Copy as HTML source" option, I got an error "The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))".
      If I don't use "Copy as HTML source", it works fine.
      
      Visual Studio 2012.
  • Possibility of removing #160 characters?
    1 Posts | Last post June 26, 2013
    • Hi, I think addin would be _the_ solution I'm looking for in copying scripts to OneNote with syntax highlighting.  The problem is that the NBSP (#160) character breaks SSMS when you try to run a script with that character in it.
      
      Any chance of having an option to use an actual space character, instead of the NBSP one, in the HTML copied?
      
      Thanks!
  • Bug report: Tabs beeing replaced with special character
    1 Posts | Last post June 12, 2013
    • When I copy/paste to a Work Item's description field, all Tabs are replaced with an "Â" character. Is that a known issue?
      
      Thanks,
      --Neno
  • Invisible line numbers
    1 Posts | Last post September 05, 2012
    • At first I thought it was losing the line numbers when I copy/paste.
      
      Then I realized my background color is black and the line number are also black (apparently hard-coded).  It would be nice if the tool would honor the configuration I have in VS for the color of the line numbers, or at least automatically choose a high-contrast color for the line numbers compared to the background color.
  • Is it possible to port this to SSMS?
    1 Posts | Last post August 28, 2012
    • Hi Tim, outstanding tool!  I just used it for the first time in my latest blog entry and it is easy and looks great.  Since SQL Server Management Studio uses the VS 2010 Shell, is it possible to manually port the add-in for usage there?  Any tips on how I could try that out?
      
      Thanks,
      Sam Lester
1 - 10 of 28 Items