copy with syntax highlighting

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
oddsock
Posts: 1
Joined: Fri Oct 15, 2004 10:54 pm

copy with syntax highlighting

Post by oddsock »

Is there a way I can copy my code with syntax highlight colors included?

I can get there via an intermediate html file (Edit->Copy Other->As a HTML Page), but would like to just copy/paste colored code snippets directly to my email (for example).

I think Notepad++ can do this via rtf, but I like TextPad.

Thanks!
User avatar
kengrubb
Posts: 324
Joined: Thu Dec 11, 2003 5:23 pm
Location: Olympia, WA, USA

Post by kengrubb »

After doing a little searching, I was not able to find an easily scriptable solution to convert the HTML to RTF. If that is possible, and someone posts it here, I'll run with it and see what I can do.

In direct answer to your question, it does not appear possible from within TP.

You could make an enhancement request for a Copy Other>As RTF feature.
(2[Bb]|[^2].|.[^Bb])

That is the question.
User avatar
jeffy
Posts: 323
Joined: Mon Mar 03, 2003 9:04 am
Location: Philadelphia

Post by jeffy »

Consider Windows' Snipping Tool. Type "snippingtool" into the Run... box. You can take a screenshot of any portion of the screen you like. Save it to the desktop, then attach it to your email.
User avatar
jeffy
Posts: 323
Joined: Mon Mar 03, 2003 9:04 am
Location: Philadelphia

Post by jeffy »

kengrubb wrote:You could make an enhancement request for a Copy Other>As RTF feature.
That's an interesting idea.
jms
Posts: 8
Joined: Wed May 13, 2009 8:26 am

Post by jms »

I wonder why this has not been implemented.
Since "copy as html" is already there, the only thing to be done is generating 5 lines of header and setting the clipboard format to Html:
Clipboard.SetText(HtmlText, TextDataFormat.Html);
Post Reply