Kinook Software Forum

Go Back   Kinook Software Forum > Ultra Recall > [UR] General Discussion

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-24-2011, 10:15 AM
Nobodo Nobodo is online now
Registered User
 
Join Date: 08-19-2010
Location: Rural Douglas County, CO
Posts: 69
Code snippets being pasted as html

When I select a node in the Data Explorer tree and then CTRL-V to paste contents of the clipboard, a child item is created and auto-assigned to either the text or document template, and an icon gets added to the item according to the content.

This works great for most content, but not for code clippings that are pasted in from Visual Studio. When I copy a method, property, etc. from Visual Studio to the clipboard, then do the CTRL-V thing to auto-create an item in UR, it is created as an html document. The pasted item gets a title of 'Snippet', and that part is nice, but the fact that it gets created as a .htm document and gets a webpage icon is not useful.

When doing the same thing from other rich text editors, the item gets created as text and gets the text item icon. Is there a way I can get that behavior with source code copied from Visual Studio?

Thanks,
Mark.
Reply With Quote
  #2  
Old 08-24-2011, 10:33 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
Apparently Visual Studio (or maybe some add-in, since I don't see that w/ VS 2003, 2008 or 2010?) includes HTML when copying to the clipboard. A couple options:

1) Instead of using Ctrl+V, use Edit | Paste Special | Paste Text (or Paste Rich Text). You can also assign keyboard shortcuts for these commands (Ctrl+Shift+P is the default for paste text) at Tools | Customize | Keyboard.

2) Check Tools | Options | Import | Prefer text/rich text clipboard formats (also at Tools | Quick Options) to always prefer text/rich text over HTML format when pasting, but note that this could also affect pasting from other apps (for instance, pasting from IE will use RTF format instead of HTML).
Reply With Quote
  #3  
Old 08-24-2011, 12:01 PM
Nobodo Nobodo is online now
Registered User
 
Join Date: 08-19-2010
Location: Rural Douglas County, CO
Posts: 69
Quote:
Originally Posted by kinook View Post
Apparently Visual Studio (or maybe some add-in, since I don't see that w/ VS 2003, 2008 or 2010?) includes HTML when copying to the clipboard..
Ahh, that got me looking....
The extension "Productivity Power Tools" (VS2010) by default changes the format of copied code to html. I turned that option off and now it is working fine.

The 'Paste Rich Text' option also works great. The 'Prefer rich text' option isn't so great because of what it does to web clippings, but you mention that. For what I do just turning off the power tools option did the trick.

Thank you for the help!

Mark.

Last edited by Nobodo; 08-24-2011 at 12:08 PM.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 03:33 AM.


Copyright © 1999-2023 Kinook Software, Inc.