I think DevonThink needs a setting for which external viewer to use for MD files. Right now it seems I have to change the default setting for MacOS in order to be able to open a MD file for preview within DevonThink to use Marked2 for preview.
That’s consistent with the behavior for all documents: DT uses the Finder’s association between file type and app.
Why change that for MD?
Agreed - plus why would you want or need to use a different external editor given that you can easily apply a style sheet in DT in multiple ways?
I can see using Marked to preview a different style sheet option - but that would not be a routine thing so I am not sure why it would need to be the default option.
Because what I want DevonThink todo with a file might be very different than what I want the OS to do with a file.
In order to properly view a MD file I now have to tell the OS to use Marked2 to open all MD files. I want my Markdown editor to open files in the OS, but in DevonThink I want Marked2 to handle my preview, in realtime. It is why that app was created.
It is not unusual for apps to have settings for which external apps are used for additional processing.
And sure add settings for all filetypes. Maybe Coda for HTML files from DT while one uses VCStudio for the heavy HTML development on their machine.
When you consider all the customization DevonThink has why would this be a bridge too far?
How can that be achieved? “All” is quite a huge set, I’d assume, as one can store every file in DT’s databases. How large should the dialog be?
-
DEVONthink does not use any external viewers. It handles its own previews in-application.
-
Marked 2 is not a Markdown editor. It also doesn’t register itself as a Markdown application or it would appear in the Data > Open With menu.
-
You can drag and drop a file from DEVONthink onto Marked’s dock icon to view it.
Another way to do this is:
- on MacOS associate MD files with Marked2 (using Command-I on an MD file and setting Marked as the default application)
- in DT have double click set to open file in external app
- In Marked, set the default editor in preferences to your markdown editor.
Double clicking in DT will open in Marked. Double clicking in Finder will open in Marked too, but pressing Command-E then opens it in your editor. Granted, it is an extra keystroke.
I had this set up myself for a long time, though now (using my own CSS in DT) I do most previewing in DT and have my preferred markdown editor associated directly with markdown files.
I agree with this
There are lots of reasons you might want to use a different Markdown editor than DT
But it’s hard for me to see why anyone would want a different Markdown viewer than DT
That’s why i mentioned it only for MD. You introduced the larger set. i just said sure, if that’s what it takes to get proper preview for MD. Might wanna add something for images so they can be edited and annotated outside of DT. LiquidText does a pretty good job with PDF’s. Could also just listen to users and add them as requested and use the current scheme for default behavior.
The MD use case is not uncommon. Many people want to view the MD in different ways and developers recognize they are not specialists in rendering MD so leave it to apps that are. AND there is already a settings page under files for Markdown!! Could slip a small field in there.
It is a perfectly sane request.
I don’t even know how to respond to this.
At some point DT is going to have to reduce the number of friction points. Entropy is setting. in.
In other threads there have been comments about how confused markdown is and how there is no standard. Well Marked2 gives you away around having to deal with what is a bit of a wild west.
So it seems to me a setting on the markdown page under files to select a markdown streaming preview app, and toolbar button on the markdown editing window that lets you open the preview. Super straightforward and it would allow your developer(s) to finally stop faffing about with what is the moving target of MD. If you need an idea of how this is done look a Drafts.
There is no confusion about what flavor of Markdown used in DEVONthink: It is MultiMarkdown and has been for years now.
Your request is noted with no promises.
MD is converted to HTML implicitly, which is done in almost identical ways by all MD tools (I know of). The HTML is then styled using CSS. You can define this CSS as it pleases you – in Marked2, in DT, in many MD tools. Change the CSS and you change the appearance of your rendered Markdown. If you prefer Marked2’s display, just add it’s CSS to the DT preferences. Or to the MD file.
OTOH, if MD tools using the same CSS show the HTML differently, we’d have to talk about these tool’s adherence to web standards.
Marked2 supports exactly two of the “wild-west” MD dialects. One of them is MMD – which is also used by DT.
How so? An MD tool has to settle on some MD version, or perhaps two of them. It can’t convert arbitrary syntax to HTML. Even Drafts offers only three dialects. I don’t know whether that is due to “faffing” or not.
Thank-you! All i ask.
I do half my markdown work on iOS, usually just looking at the unrendered text, so Marked2 doesn’t really apply across my whole workflow, but I must say that it’s ability to render the Fountain script writing format caught my eye when I just looked into it.
That Marked2 website is well written and clearly laid out. It felt like when I found the DevonThink website after struggling with Neat Receipts and then Paperless.
Thanks for bringing it to my attention.
Can you show me an example of a Markdown style sheet you want to implement that does not render properly in DT? I have never encountered such a situation - even with some pretty extreme CSS that I have found on the web and tried in DT.
It seems to me this is a solution in search of a problem. Again - there are many understandable reasons why you might want a different Markdown editor than DT. I have yet to see the situation where DT fails as a Markdown viewer - can you give us an example or two?
No. Because that isn’t the point. I know it can be done. I have been using DT for over a decade I know how powerful it is. BUT… I am short of time. I am on multiple devices and more and more my “stuff” is being done on trains and coffee shops. At traffic lights. Stolen moments. And then at the weekend, I go and collate and cull and merge and link to photos and files DT db.
Here is an example… but before I say this I will caveat it with… I LOVE DT. I have advocated for it. my friends have bought it and use it… BUT…
This is an iOS/iPadOS example… Attached is the widget Drafts gives me that allows me capture information. When I hit that plus symbol I am presented with a blank sheet with a cursor sitting waiting for me to type. If I hit the Clipboard, it will copy whatever is on the clipboard into a blank document and I can start typing.
Compare that workflow with DTTG. I can create Apple Shortcuts, sure… but friction. I can long press on the icon… but that is hardly the same.
To your second point… I could easily move an MD file into DevonThink that it couldn’t preview properly. I have an example right now where DT does not recognize the size tag on an image…
So of these two lines only one renders an image. Neither renders in Marked2 because it can’t find the files, which is another problem.
![[Pasted image 20230601144110.png]]
![[Pasted image 20230601170650.png | 300]]
Finally… EVEN Bear, supports viewing using Marked2. And Bear does a better job in internal rendering than Drafts does.
I am probably boring people at this point. So I’ll end by saying forcing us to change the MacOS level file associations to preview a MD file that I have stored in DT - files that come from multiple sources - is a bit 1994. I thought I would ask if the DT team could just pop a toolbar button and small field on the already existing settings page allowing me to have a streaming preview. Jim says they will think about it. That’s all I ask… Can’t wait to see DT 4.
If a toolbar buton is what you are seeking then it would be trivial to write a script to open the current selected document using a specific external viewer and place that script on the Toolbar with the icon of your choice.
Regarding editing - no question Drafts make it easy. I presume you realize it’s pretty easy to create a Drafts action to send from Drafts to either DTTG or DT.
Regarding your display example - could you show us a screenshot of how DT renders it vs how another Markdown viewer renders the same thing?
Perhaps because that is not specified in the proper MMD syntax?
See MultiMarkdown User's Guide
The issue here is obvious: You chose a certain syntax that is not MMD compatible. Then you chose a product that renders MMD and find that it doesn’t support your chosen syntax.
No surprise there. Not even anything to complain about.
MD is not standardized. There are different dialects. No product renders all of them (not even Marked2, nor Drafts). There are, of course, issues with external files that one product can find on the disk and another one can’t.
Your best bet is to settle on one MD version, and since you’re working with DT, that should be MMD with CriticMarkup extensions. Then choose your other tools so that they work with that dialect. If you mix MD variants, you’ll invariably run into issues with one tool or the other.
FWIW, that’s exactly what I do and find it works nicely.
I’ve used Marked as a one-click view in DT3 for years.
Marked 2 should appear in the Data > Open with…
menu.
Go to system settings and give it a shortcut (I use cmd-opt-ctl-m
). Then when you want the preview it’s a keystroke away. You don’t have to change any OS file associations.
Is there something else that you need apart from this?