Copy selected code in HTML format while preserving syntax highlighting, indentation, background colour and font. 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?
I cannot copy html code in Visual Studio 2013. I mean I cannot copy from a file with extension .html. I do not get the option copy as html as in all other code files.
I would like to copy html snippets in a documentation so I can actually see the html.
My settings: I use VS2012 PRO on Windows 7 PRO x64. I have changed background color in VS in code window, to some light brown nuance, in order to have my eyes less tired.
When I select Copy as HTML, option for background color is grayed, and I cannot change it. Selected color is white. In spite of that, when I paste it on Word 2010 page, I get the background of the text light brown, just like on the code page I copied it from.
Also non English characters are not those I typed. There are two characters instead of one non English character. So it’s not really WYSIWYG.
Are there any workarounds about these two problems? Is this because I use Word as a target for paste? Is there some other, preferably Microsoft’s tool for HTML editing (preferably free)?
Otherwise, I find this Add-In useful for color printing and making documentation, even if I have to do some editing in Word before actual use of pasted text.
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, 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 126.96.36.199 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?
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,