Page 1 of 1

Copy the code with the style and the color given in PowerShell Studio

Posted: Wed Jun 17, 2020 4:12 am
by DanielLeber
Good morning

I have a request for a new feature in PowerShell Studio.
Often I find myself documenting my PowerShell code in MS-Word or OneNote for example. Therefore, it would be helpful if I could copy the code with the style and the color given in PowerShell Studio. Similar to the « Copy HTML » function, just without the background color.

Thanks
Daniel

Re: Copy the code with the style and the color given in PowerShell Studio

Posted: Mon Jun 22, 2020 1:29 pm
by brittneyr
The main reason for this is so the syntax coloring with still be easily visible regardless of the location as the syntax coloring changes based on the current skin used. This can also be removed by updating the pre tag to remove the background-color like the following:
  1. <pre style="background-color: #2D2D30;">
To this:
  1. <pre>
If you would like to make a formal feature request, please submit your request here:
https://www.sapien.com/requests

Re: Copy the code with the style and the color given in PowerShell Studio

Posted: Fri Jul 03, 2020 6:49 am
by DanielLeber
Hi Brittney

This means I would have to copy the PowerShell code (as HTML) into a text editor, remove the pre tag, save it as HTML, and copy-paste the HTML code into my OneNote document. That isn’t an option for me, for it takes to many steps.
I currently use the following workaround: I copy the code into an Outlook mail and from there back into an OneNote document. I know, it sounds stupid. But this way, I can obtain the color style from the code.
Is there a possibility or a feature to do this directly from the PowerShell studio?

Re: Copy the code with the style and the color given in PowerShell Studio

Posted: Tue Jul 07, 2020 7:30 am
by brittneyr
At the moment, there is no way to directly do this from PowerShell Studio.

If you would like to make a formal feature request, please submit your request here:
https://www.sapien.com/requests