Challenges with the automatic “RTF to Markdown” converter [solved in DEVONthink 3.8]

The name of the apps would be good so that we could try to reproduce this, the conversion is applied only if the clipboard contains rich text which it shouldn’t according to your description.

BBEdit & Firefox

Did you copy the link in Firefox from the address bar or via the contextual menu of a link? And do you use the latest release (3.7)? Thank you!

Using Firefox 88.0 (64-bit). I tend to copy from the address bar. I also use BBEdit version 13.5.5 (415108, 64-bit Intel, sandboxed).

And do you use DEVONthink 3.7?

Yes!

@UncleWalrus I tried your suggestion of switching shortcuts some days ago, i.e. setting

  • Paste And Match Style to ⌘V
  • Paste to ⌥⇧⌘V

It seemed to be a doable workaround.

Now, without thinking about the changed shortcuts, I tried to paste an image into a RTF record and got very confused because ⌘V didn’t paste the image.

After I finally found out why the shortcut didn’t work (Paste And Match Style is disabled if there’s an image on the clipboard) I created a Keyboard Maestro macro that uses Paste And Match Style if it’s available, otherwise it uses Paste.

It’s a trade-of:

  • do I want to get confused when pasting into a RTF record doesn’t work as expected

or

  • do I want to get confused when pasting into a Markdown record doesn’t work as expected
    (This of course would also be the case without the macro, due to the automatic RTF to Markdown conversion that can’t be disabled)

It’s plain wrong that a user has to make this choice.

A core functionality like pasting should simply work as expected.

@pete31 I’m not disagreeing with you; I was only offering the solution as a temporizing measure should the developer decide not to implement the changes. I haven’t run into this conflict yet, because I practically only work in Markdown.

1 Like

I just checked this again but after copying the URL from the address bar the clipboard doesn’t contain rich text actually and nothing’s converted over here when pasting it into a Markdown document. Do you use any Firefox extensions, which macOS version do you use?

Yes, of course. The whole situation is of course not your fault. Sorry if it came across like that.

For those who use Markdown and RTF and who use Keyboard Maestro.

Menu View > Document Display > Source View is available in Markdown records but not in RTF.

Again it’s a trade-off as with this marco it’s not possible anymore to paste the path of an image that’s on the clipboard. Don’t know what else is lost.

Edit:

With the above macro it’s not possible to paste into Alfred while DEVONthink is frontmost.
Using a Type a Keystroke action that sends ⌘V works.

Final Edit:

Nope, the previous Edit (of course) doesn’t work with Alfred if DEVONthink is frontmost and a Markdown record is selected.

This finally works:

  • Set a variable to the clipboard
  • Set the clipboard to the variable
  • Send ⌘V via Type a Keystroke action

Scratch that, having not needed to paste a URL into a MD file for a few days, when I did so today, it still escapes the : character.

I’m now moving my MD workflow out of DT as it’s causing to many problems. As I post these MD files online the URLs create an error, because I failed to recognise that DT escapes :. It’s creating more work.

I could never reproduce this using the same Firefox version (without extensions). Could you please post an example URL? Thanks!

Apologies, this is pasting a url from apple messages app.

Seems that the stuff copied by Messages on Big Sur is somewhat weird, e.g. after copying a URL and pasting it into a TextEdit document the URL is inserted twice. I’ll check this.

1 Like

Yeah, noticed that too!

Added both a workaround for Messages.app on Big Sur and a better rich text recognition.

1 Like

This has been solved with DEVONthink 3.8.

Release notes:

Added hidden preference RawMarkdownPasting to avoid the conversion or formatting of links or rich text content when pasting into a Markdown file. This option is off by default.

From help Documentation > Appendix > Hidden preferences:

RawMarkdownPasting: When pasting rich content into a Markdown file, the formatting is converted to Markdown. Enable this to ignore formatting and paste as raw plain text.

Click the link in the help to enable the hidden preference.

Thanks for listening to users!

3 Likes

This was a great post. Just to add a comment that the RawMarkdownPasting in Markdown is exactly how I use the link in templates. So having this is a great feature.

Thanks for posting it since it saves me from having to redo a lot of templates or having to delete a bunch of characters when pasting links.

1 Like

Welcome @rowlanjr

Glad to hear the hidden preference is useful to you :slight_smile: