#1
|
|||
|
|||
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? |
#2
|
||||
|
||||
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.
|
#3
|
|||
|
|||
Nice Workaround, quant. :-)
Is there a better way? Maybe change the template item to "Source code" or something similar? |
#4
|
|||
|
|||
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. |
#5
|
|||
|
|||
Works as needed, thank you very much! :-)
One minor glitch - the new source code template does not have a scrollbar. |
#6
|
|||
|
|||
If the text doesn't all fit in the window, it should display a scroll bar.
|
#7
|
|||
|
|||
Quote:
|
#8
|
|||
|
|||
#9
|
|||
|
|||
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 07:28 AM. |
#10
|
|||
|
|||
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.
|
Thread Tools | |
Display Modes | Rate This Thread |
|
|