Text highlights coming in from other sources

I’m new here but have been using DTPO3 for about a year now.

From fairly early on I had adopted @Bill_DeVille’s method for saving websites as rtfd files, using Cmd-)

I’m generally very happy with it as a method but I have noticed a strange glitch that I can’t get around:

If I use the command on a dark webpage (i.e. one with a dark background and light coloured text) then it brings it into DT as light-coloured text with a dark highlight. Now, it doesn’t look amazing but it’s readable. There is a functional cost though, as the highlights/annotations inspector will be filled with every paragraph in the document. I can set the text colour to black easily using the in-app rich text editor. I can also remove the highlight, but if I do so, DT will retain the highlights in Annotations inspector, but their colour will be set to none. In effect, the entire document will still be highlighted.

The situation isn’t helped by my predilection for Dark Mode wherever I can get it. That throws up interesting clashes, such as fixing the above problem in Textedit, but then finding the Preview pane in DT renders a white background from Textedit as white, while switching the text to white also.

I’d like to better understand the colour layering in an rtfd. - There seems to me to be a background colour & a highlight colour, and to understand how these relate between Textedit/Cocoa text system and DTP.

Any help much appreciated :smile:

Importing (including services) always stores files & data unmodified, in this case it’s the RTF data provided by the browser. Which version of macOS and which browser do you use?

Hi,
I’m running MacOS Big Sur 11.6, and Safari 14.1.2.

Thanks for the reply.

And do you use dark mode or is it just a web page having a dark background? In the end it depends on whatever Safari provides to the service.

Short answer: It happens both in a dark website & a white website in dark mode. My understanding is that the website has to offer a dark mode version which Safari then elects to present, while running in Dark Mode.

I did find a workaround of sorts, which is outlined below.

In summary, you are correct in that DT brings it whatever Safari displays. The differences are born out in how DT and TextEdit represent these files, while in Dark Mode. I don’t know if these are system-wide MacOS issues.

Scenario: System in Light Mode / Website with Dark Background
This works in both Light and Dark Mode and just to be able to see the colours.
The text comes into DT as an rtf with a white background, the text highlighted in black and the text in white. The highlight is treated as an annotation in the inspector.
Visually, this isn’t actually that bad, but functionally it has still created a highlight/annotation for every paragraph.
Fixing it: I can select all the text, change the highlight to ‘Off.’ – What I tried to do before was to delete the highlight, but that would delete the entire paragraph. That’s a bad idea. – Changing the highlight to off removes the annotations but now I have white text on a white background. I can fix that with Cmd-T & Cmd-Shift-C to bring up the fonts & colours palettes where I can change the font colour to black.

I think a part of what was confusing me before was the differences between how TextEdit and DT treat rtf colour palettes in Dark Mode. This led me to editing files and the files then appearing differently when opened. TextEdit also has a ‘Use Dark Background for Windows’ option, and it’s still not clear to me how the rtf colours relate to the palettes in Textedit in Dark Mode.

I’m very curious to know if there are any thoughts on this?

DEVONthink does not adapt colors (especially background colors) exactly like TextEdit for dark mode. One workaround might be to disable dark backgrounds (see Preferences > General > Appearance)