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.
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.
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?
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?
Noel C. Gordon
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:
Ideally I need to improve the programme logic, but I don’t currently have access to VS2012.
Hope that helps,
Hi, Thanks for excellent tool!
I think I may have some kind of encoding issue.
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 188.8.131.52 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 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   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?
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'.
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.
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?
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.