Hi there—I’m new to DT after years of trying other apps (I almost started back in the Yojimbo days… I regret my choice…) The UI improvements of DT3 have finally convinced me to join the club.
I have two main concerns with DT as I see it now:
Markdown feels like a second class citizen. No syntax highlighting (without a convoluted workaround using prism.js that I tried for an hour today to get working without luck) and generally a feeling of having to convert everything from RTF to markdown myself. I’d love to se Markdown elevated to a first-class citizen in the DT ecosystem
a lack of networked knowledge features built-in, such as backlinks. DT’s AI is a very powerful feature and there’s so much possibility in connecting the knowledge in a DT database to itself, but much of this is not revealed by the current UI of DT. I’d love to see more features in this regard.
Note DEVONthink is not a Markdown editor at its core (and Markdown is far less popular than people want to believe (including me ). DEVONthink is a document and information management application with some convenience features like support for creating some file types. It’s never going to have all the features of a bespoke Markdown or RTF or image, etc. editor, as that’s not the core focus of the application.
Also note you can Command-Option-drag and drop DEVONthink files into a Markdown document to insert a valid Markdown link.
WikiLinks are also supported.
PS: prism.js is not made for doing syntax highlighting while editing. it is for syntax highlighting in the rendered HTML.
Yes! I’ve been trying out the WikiLinks feature, it works quite well (though it’s auto suggest can be a bit “dumb” at times suggesting longer item names when a shorter one will do).
A big difference however is backlinks - Roam automatically creates backlinks to every file that another references. This would be very useful in DT and currently requires a slow and janky scripting process. Roam also supports atomized linking - each paragraph inside its markdown-style files is given a unique UUID to allow for granular linking (and back-linking). Creates a lot of interesting knowledge-management possibilities.
As far as Markdown is concerned, for sure not looking for a full do-everything editor (can use other apps for that). More just asking for Markdown to be equal with RTF as a first-class citizen, EG for templates and defaults to be equal between them. For example, right now if I want to use markdown in the daily journal workflow I have to hand-build my own template. No big deal for one workflow… but added up to all the possibilities in DT and there’s a lot of places where RTF is the default and markdown has to be manually edited.
And prism - yes! Understood, it’s just for rendered formatting. Still can’t get it to work though and something like this which is a common use case for markdown (code snippets etc) seems like a good candidate as a possible built-in option for a knowledge management app with as much power as DT
More just asking for Markdown to be equal with RTF as a first-class citizen, EG for templates and defaults to be equal between them. For example, right now if I want to use markdown in the daily journal workflow I have to hand-build my own template. No big deal for one workflow… but added up to all the possibilities in DT and there’s a lot of places where RTF is the default and markdown has to be manually edited.
RTF is a far more mature and popular format used by the majority of our user base (which incidentally is not primarly coders, but often academics, office personnel, and people running apps that natively support rich text (Word, TextEdit, etc.). RTF is far more prevalent and embedded in the user experience of many, many of our customers (even some people in here :P).
As far as extra templates, etc., part of the beauty of DEVONthink is the ability to extend it by adding your own templates, etc. With some know-how and ingenuity, you can roll many of your own solutions.
(though it’s auto suggest can be a bit “dumb” at times suggesting longer item names when a shorter one will do)
I am not sure what you’re referring to here.
Still can’t get it to work though
You need to make sure to load both resources properly and denote the language on the first line of a codeblock…
<link href="resources/prism.css" rel="stylesheet">
tell application id "DNtp"
Multiple issues here. The Markdown is I guess a question of priorities. If knowledge workers and programers are to be a big focus going forward, Markdown is an obvious place to invest—but it’s not my software! I can just make the request as I see so many issues referenced on these forums that would be solved. Would love to see it in the future.
For the other two—I’m trying to figure out how to fork this conversation in Discourse—any tips?
For prism.js I’ve done as you’ve suggested (originally following the instructions from the primary thread on the topic) but I can’t tell why it’s not working. I’ve tried every style of reference—put the files inside a group named assets and then link at “assets/prism.css” (and .js); using the x-link URLs; hard-coding a link on my file system… None seem to work. It’s hard to debug if DT is seeing the files.
For WikiLinking, for example if I have two pre-existing documents:
“DEVONThink is awesome, everyone should use it”
“DEVONThink’s limitations for networked knowledge and how to get around it”
… and then in a new note try to type [[DEVONThink Notes]] to create a Wiki link to a new document, it’s damn near impossible to overcome the fervent efforts of the autofill system to fill with the longer item names.
Noticed a bug here: this works properly for Markdown files loaded in the main view, but it doesn’t work properly for markdown-formatted annotations. It just inserts the title of the document rather than the link.
I just had an “aha” moment that links together several ideas across several forum threads.
MultiMarkdown supports links to anchor tags. This can take the form of an internal link within the same markdown file (headings automatically create an anchor tag), or an external link to a standard URL with an anchor tag. However, anchor tags don’t seem to work in DEVONthink for x-callback URLs.
# Link to Headers via Anchor Tags
With MultiMarkdown, I can do [internal links] to other headings in the same markdown document.
If I link to an [external page](https://github.com/fletcher/MultiMarkdown-6-Syntax-Guide/#building) with ```https://url#anchor``` it will also work.
However, if I link to a markdown file's [heading](x-devonthink-item://XXXCALLBACKXXX#anchor) with an internal DEVONthink x-callback URL using an anchor tag, it doesn't work.
## Internal Links
The first item in the [Examples] will link here.
If DEVONthink supported the MMD anchor-tag format for internal x-callback URLs, it would enable the specific “knowledge block” addressing needed for true networked knowledge management. This would open up a whole new world of workflows within DT without requiring any other change as far as I can see. And it’s already supported within MultiMarkdown.
What do you think?
Here are some of the other forum threads for reference:
Not sure I understand the need to specifically link to headers within a MD file. You can link to any line or word you want by using the x-callback url scheme. E.g.: x-devonthink-item://...?line=NUMBER or x-devonthink-item://...?search=WORD. Lines can change if you edit the document, so it is simply a matter of choosing a unique ID for any given header and link there.
Ah that’s very useful, thank you! I didn’t know about that functionality. Is it documented anywhere?
Named anchor is still a good addition I think. It uses the MultiMarkdown spec, it’s less fragile (named anchors can remain consistent in MMD even as text changes and moves). It also translates well to other systems, EG if a bunch of notes are converted to HTML. And it’s already built-in… just not for x-callbacks
Ah, ok - so in the context of this thread about Markdown, this syntax doesn’t work. So the situation remains of desiring a way to link to a specific section of a markdown document.
Using the MMD spec for linking to anchor tags via x-callback would be ideal. If not, enabling the ?search=name for markdown documents would also be a way to go. I’d prefer anchor tags but if development @cgrunenberg or anyone has a chance to make it work I’ll be happy!
I have no need to create links to headers in other MD files. EDIT: Of course, this would work for the header only if you are using edit-mode. Not sure if this is why you’re asking. (One could always simply place the id in the following line, if one prefers to use preview-mode).