Depending on the browser you are using, you will or will not see a vertical scrollbar when you copy/paste HTML code from the PowerGui Script Editor.
Thanks for the hints Luc. The PowerGUI highlighted code looks great
Thanks Yasen.
If you find a way to suppress the vertical scrollbar in IE let me know.
Have been looking but can't seem to find it 😞
It looks like if the code is to wide to fit in the window, IE creates a horizontal scrollbar and puts it over the last line of the code. Then automatically a vertical scrollbar is created. The best solution I found for this problem came from http://ycouriel.blogspot.com/2010/07/pre-tag-internet-explorer-scrollbar.html.
Insert
<!--[if IE]>
<![endif]-->
before the ending </pre> tag.
Now all the code is visible without scrolling.
Helpful, thanks. Just now found this due to your reply (LucD) at http://communities.vmware.com/thread/301243?start=15&tstart=0.
I had searched the communities a few times before, but did not find any helpful items that referenced "syntax highlighting", which was part of my search string. I just saw the "Copy as HTML" feature in PowerGUI's ScriptEditor about two (2) days ago, and made the assumption that this must be how some people are making the code in their posts more readable. But, now I know for sure.
So, I am adding a comment here with a couple of keywords for other people that might be searching in the same way: syntax highlight highlighting. (And, I am assuming that the Search feature here indexes comments on documents).
Thanks for the doc
This works well to capture the PowerCLI colors but I always have a problem with longer code lines getting pushed together and becoming difficult to read. I noticed threads like this where they there is no issue. Do I need to start manually modifying the HTML or making sure all of my lines are shorter than a certain character limit?
Thank you very much!
This is a great way of improving the readability of PowerShell Code in the posts. Looks very good.