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

Post feature requests, product enhancement ideas, and other product-specific suggestions here. Do not post bug reports.
Forum rules
Do not post any licensing information in this forum.
This topic is 3 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
DanielLeber
Posts: 20
Last visit: Thu May 18, 2023 8:36 am

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

Post 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
User avatar
brittneyr
Site Admin
Posts: 1649
Last visit: Mon Mar 18, 2024 1:47 pm
Answers: 38
Been upvoted: 30 times

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

Post 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:
Code: [Select all] [Expand/Collapse] [Download] (Untitled.html)
  1. <pre style="background-color: #2D2D30;">
To this:
Code: [Select all] [Expand/Collapse] [Download] (Untitled.html)
  1. <pre>
If you would like to make a formal feature request, please submit your request here:
https://www.sapien.com/requests
Brittney
SAPIEN Technologies, Inc.
User avatar
DanielLeber
Posts: 20
Last visit: Thu May 18, 2023 8:36 am

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

Post 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?
User avatar
brittneyr
Site Admin
Posts: 1649
Last visit: Mon Mar 18, 2024 1:47 pm
Answers: 38
Been upvoted: 30 times

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

Post 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
Brittney
SAPIEN Technologies, Inc.
This topic is 3 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked