Kinook Software Forum

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

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-05-2011, 12:24 PM
Mike12345 Mike12345 is online now
Registered User
 
Join Date: 03-03-2009
Posts: 4
How to enable Syntax Highlighting

Hello,

i would like to copy & paste source code from a browser window to a UR text item. How can i enable syntax highlighting for those items?
Is there a easy way to do this?
Reply With Quote
  #2  
Old 02-05-2011, 02:33 PM
quant's Avatar
quant quant is online now
Registered User
 
Join Date: 11-30-2006
Posts: 967
I usually paste some code snippet to IDE where it changes font and color and then copy/paste from there, so it's a two step procedure.
Reply With Quote
  #3  
Old 02-05-2011, 03:40 PM
Mike12345 Mike12345 is online now
Registered User
 
Join Date: 03-03-2009
Posts: 4
Thumbs up

Nice Workaround, quant. :-)

Is there a better way? Maybe change the template item to "Source code" or something similar?
Reply With Quote
  #4  
Old 02-06-2011, 09:19 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
Syntax highlighting in rich text items isn't support (except for static highlighting when copying formatted RTF as quant described).

Another option is to import a source code file as a template in UR and use UR's text file syntax highlighting.
http://www.kinook.com/UltraRecall/Ma...itordialog.htm

After creating a text file template item, create new items from that template and copy/paste source code into it.
Reply With Quote
  #5  
Old 02-07-2011, 09:27 AM
Mike12345 Mike12345 is online now
Registered User
 
Join Date: 03-03-2009
Posts: 4
Cool

Works as needed, thank you very much! :-)

One minor glitch - the new source code template does not have a scrollbar.
Reply With Quote
  #6  
Old 02-07-2011, 09:56 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
If the text doesn't all fit in the window, it should display a scroll bar.
Attached Images
 
Reply With Quote
  #7  
Old 02-09-2011, 01:47 PM
Roaster Roaster is online now
Registered User
 
Join Date: 08-01-2007
Posts: 51
Quote:
Originally posted by kinook
After creating a text file template item, create new items from that template and copy/paste source code into it. [/B]
Does this imply that the copied text is still editable? If I remember right, when importing a source code file, eg JavaScript, the syntax is highlighted however the text is not editable.
Reply With Quote
  #8  
Old 02-09-2011, 01:53 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
Yes, see http://www.kinook.com/Forum/showthre...?threadid=4778
Reply With Quote
  #9  
Old 02-10-2011, 06:09 AM
Roaster Roaster is online now
Registered User
 
Join Date: 08-01-2007
Posts: 51
Thanks for your reply.

I've now added .js to the list here: Tools | Options | Documents | File extensions.
The option "allow internal editing of linked documents" is set to true.

Afterwards I've used drag and drop to insert a blank file named JavaScript.js into the template folder inside UR.

My intention was to have a template which shows syntax highlighting each time I'm creating a new item based on this template. However, the new item and the template as well just shows a link "Click here to open linked document" instead of an editor.

Did I made sthg. wrong? I've restarted UR after setting the new options, btw.

EDIT: I got this running somehow, although I do not know exactly which steps I took. Perhaps inserting a *not* blank JavaScript.js file instead of an empty one did the trick.

Last edited by Roaster; 02-10-2011 at 06:28 AM.
Reply With Quote
  #10  
Old 02-10-2011, 07:12 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
Right, the imported document can't be completely empty. It must contain at least a single character (could be a space or newline) in order to be stored rather than linked.
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 05:52 PM.


Copyright © 1999-2023 Kinook Software, Inc.