In Safari, take a look at your Scripts menu. Try this one: “Add text to DEVONthink”. It’s not necessary to select the text. Just click in the page background and select the script. A plain text document is saved in DT Pro that’s text-only. Want to make it rich text? While viewing the new document, select Format > Make rich text (Shift-Command-T).
Changing a rich text RTFD document with images to plain text will remove all the images.
This can be done using Data > Convert…
Easier: Open your RTFD document and click in it. Press Shift-Command-T to convert it to plain text.
Want to convert it back from plain text to RTF? Press Shift-Command-T again. Now it will be rich text, but without images.
thanks for your fast reply. but sadly your suggestions are not a solution for my problem because the nature of plain text is that bold, italic etc. are not preserved which I want to. this the reason I choose rtf instead of plain text.
but I can’t imagine that there is no way to manage this problem with scripting.
Any simple scripting approach would produce the same results. I’ll leave to the scripting experts the possibility that a script could examine the RTFD code for insertion of images and delete only the images.
Of course, you could always do what I do when I’m viewing an RTFD document that contains an image I don’t want to keep. Just select and delete it.
Most of the captures I make from Web pages are in RTF or RTFD, with only the text and images that I want selected. Many Web designers make this easy, as in the example of Science Magazine online, where one can select the text and images of an article without selecting other unwanted material. Other sites, such as the New York Times, allow one to select a “Print” version.
Here’s some code removing the attachments (images) from the rich text visible in the frontmost window:
tell application "DEVONthink Pro"
tell text of think window 1
repeat with theAttribute in attribute runs
if exists text attachment of theAttribute then set text of theAttribute to " "
Just created a test document containing several instances of “taz” and additional other words and it’s still working. Maybe the case is different as the script is case sensitive, e.g. “TAZ” won’t be replaced?