Difference between clipping Safari page to formatted note and copying/pasting into formatted note

I have an issue: when I use the DevonTHINK Clipper or select text from a Safari page and right-click Share, then DevonTHINK and a Formatted Note much of the formatting from the webpage is lost. When I copy and paste from the Safari page into a new Formatted Note, the formatting is retained (but not the website url).

Sharing some screenshots for comparison. Is there some reason DevonTHINK clipper isn’t retaining the actual formatting?

Thanks!

William

!

Did sharing open the Clip to DEVONthink or Take Note tab of the Sorter? Depending on the selection and what’s provided by the source application this might vary.

However, right now usage of services like DEVONthink 3: Take Formatted Note (see System Preferences > Keyboard > Shortcuts > Services) or the Sorter’s Copy Selection hotky (see Preferences > Sorter) are recommended.

This is very odd—the Sorter’s Copy Selection hotkey works, but still not as well as copy & paste (see side-by-side screenshots below).

But two Services—DEVONthink3: Take Formatted Note and DEVONthink3: Take Rich Note—don’t work at all, neither via the assigned hotkey nor by right-clicking and selecting under Services. However, DEVONthink3: Take Plain Note works fine.

Do you have any idea why those two Services aren’t working at all?

Thanks again!

Do you already use Safari 14? Its support for services is unfortunately currently broken but Apple is aware of the issue.

Yes, I updated to Safari 14, so I guess I’ll have to wait for a fix. It doesn’t seem to work on Chrome, either—and using the DT3 Web Clipper to a Formatted Note is even more of a mess there (see attached).

I can use the Sorter Copy to clip, but it’s frustrating that it’s not only that it’s not formatted correctly, but that it doesn’t add the url to the document—and often, the name of the note is the entire text of the page!

I know it’s been discussed at length, but the web clipping is really the weakest part of DEVONthink for me. To be able to copy information from the web might even be the single most essential feature for me—and it just doesn’t work with any consistency. For example, even when I’m on a page that’s already a pdf in Safari, DT3 won’t be able to clip it to a pdf. I have to save the pdf, open it in DT3, and then manually enter in the url, title, etc. That just seems odd—isn’t there a way for DT3 to do that?

1 Like

Example URLs would be helpful.

Of course. The page I was trying to clip as a Formatted Note, seen in the above images:

And an example pdf can be found here—I actually find DT3 fails to accurately clip pdfs more than 50% of the time—but maybe that’s just the pdfs I tend to clip?

https://www.thelancet.com/pdfs/journals/ebiom/PIIS2352-3964(17)30164-0.pdf

Here’s how the above-linked pdf looks when I try to Clip to PDF (Paginated). This is pretty typical; I often I end up with just one page of the pdf with a portion blacked out or missing:

I’d love to find out that it’s something I’m doing wrong and can rectify!

Thanks for your help,

William

Don’t know if that helps but you could try this AppleScript. It creates an empty formatted note with name and url, then opens it so you could paste manually.

For testing it creates the note in the current group but it can be easily changed to ask each time or to always use a specified group.

-- Create empty formatted note with name and url to paste manually

tell application "Safari"
	tell current tab of window 1
		set theURL to URL
		set theName to name
	end tell
end tell

tell application id "DNtp"
	try
		set theRecord to create record with {name:theName, URL:theURL, type:formatted note, source:""} in current group
		open window for record theRecord
		activate
		
	on error error_message number error_number
		if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
		return
	end try
end tell

Thanks—I really appreciate the helpful script! Oddly, though, it didn’t capture the URL from this current page. Other pages seem to work well, although in one instance it didn’t clip the full url. I know virtually nothing about scripting—any idea why it wouldn’t work on this page?

Difference between clipping Safari page to formatted note and copying/pasting into formatted note

This is what the script you sent captured from this current page, at the above url:

The PDF is an issue with cookies (which are no longer supported across applications in macOS) on this site.

I viewed the URL in DEVONthink and succssfully clipped it.

Regarding the other URL, I would suggest clipping it as a PDF or webarchive.

I know this can be very confusing until you once know what happened. It’s the full url but the Inspector displays it in a way that one can think it’s cut. Just select the url field and move down via mouse or key to see the whole url :slight_smile:

Thanks, Pete—got it!

1 Like

Pete,

This has served me incredibly well—again, thanks so much!

Now I’m trying to do the exact same thing, except creating a new Rich Text document rather than a Formatted Note.

I’ve used the exact same script, but simply modified the line:

set theRecord to create record with {name:theName, URL:theURL, type:formatted note, source:""} in current group

to replace “formatted note” with “rich text”, as so:

set theRecord to create record with {name:theName, URL:theURL, type:rich text, source:""} in current group

But for some reason, it’s not working! Any idea why? It doesn’t return an error—it just doesn’t create a new document, or do anything of which I’m aware.

Thanks so much in advance!

William

Glad it’s useful :slight_smile:

It’s type:rtf and rich text:""

-- Create empty RTF record with name and url to paste manually

tell application "Safari"
	tell current tab of window 1
		set theURL to URL
		set theName to name
	end tell
end tell

tell application id "DNtp"
	try
		set theRecord to create record with {name:theName, URL:theURL, type:rtf, rich text:""} in current group
		open window for record theRecord
		activate
		
	on error error_message number error_number
		if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
		return
	end try
end tell