Is there an iOS markdown editor that works with DTTG?

CSS is not really the main topic here, but so be it…

That’s of course a matter of taste, but grid is out now for some years. Might be worth thinking about a more robust and modern approach :wink:

Again, matter of taste. But why go to all the trouble of markdown at all if you then use HTML anyway (for presentation, no less)? <img alt="alt-text" class="m_l" src="img/1.jpeg"> does the same, saves one level of HTML in the final output.
Of course, this says nothing about the general problem with images in MD: They have to be always in the same place. Bear seems to solve this with a kind of package (basically a folder), iA Writer just doesn’t care (same as DT). So you have to care: Make sure that the images are in the same relative (if you use relative URLs) or absolute location (impossible to achieve across platforms).

You might want to decide on the margins you set. You have 10px all around and auto for left and right. That makes no sense. height: auto is the default, so no need to set it. One of your problems with all these floats might be that you don’t clear them (one of the reasons why float should be avoided nowadayas). But since your description is not complete, it is not possible to figure out what’s not working why here. But maybe this helps: css - Responsive Image full screen and centered - maintain aspect ratio, not exceed window - Stack Overflow

Thanks for the detailed reply — it’s interesting to see how you’ve set the CSS.

Unfortunately, as you say, the problem isn’t with the CSS, it’s with the precise format of the markdown links, specifically the part between the parentheses (). There doesn’t appear to be a single format which shows images properly on DT3, DTTG and both versions of IA Writer (and as far as I can see, any other iOS markdown editor — that is, when you open the document in that app from DTTG.

E.g. Create a document with links to test.img in a subfolder ‘media’, and create links with the following formats:

1. ![test image](file:///Users/username/folder%20name/media/test.img)
2. ![test image](media/test.img)
3. ![test image](./media/test.img)
etc

The images show as follows:

  1. DT3 — all shown correctly
  2. DTTG — only 1 and 2 shown correctly (is this a bug?)
  3. iA Writer Mac — all shown correctly
  4. iA Writer iOS opened from within DTTG — none shown at all
  5. iA Writer iOS opened directly in app — 2 and 3 show correctly. (Only on iCloud Drive)

iA Writer, when opened from DTTG:

Opened within iA Writer:

NB: To get iA Writer iOS to show any images, you have to first add the location to their library in iOS, and then open the markdown file directly inside the app. Because of the way iA Writer interacts with Dropbox on iOS, you can’t add a Dropbox folder to their Library, so method 5 doesn’t work on Dropbox — only on iCloud.

So, as far as I can tell, there is no way of viewing markdown indexed images when you open from DTTG. If I’m missing something (very possible…), I’d be grateful to be pointed in the right direction!

Thanks.

1 Like

This can of course only work in an environment providing the exact same path, starting with a Users folder at the root level. Since that doesn’t exist by default anywhere but on you own Mac, it’ll work only there. That’s neither surprising nor a “bug” but by design. iOS does not provide access to its filesystem to apps this way.
The only chance, as you found out, is a relative path to the image. That even this does not work with iAwriter opened from DTTG might be due to the fact that DTTG does not pass the path too the file but it’s content (which seems logical in this context: sharing has to work with all kinds of data, also those that are not a file). No path, no (relative) Location, end of story.

MD is a text format for (mostly) structural text. It can be bent in other directions, but there are limits to this. If representation is important, another format would probably be better, like PDF.

Or, alternatively, embedding the images as data URLs in the MD file. Which would increase their size quite a bit and make large parts illegible. But there’s always a downside…

Sure — I understand why the full path doesn’t work on iOS (it was there because we’re talking about viewing the same file on all platforms, that’s all): would be helpful if it did, but it doesn’t.

As for whether it’s an issue with what DTTG passes on (or not), it’s still useful for the implications to be listed. I’ve not seen a post anywhere which explicitly said “You can’t view markdown images if you open the file from DTTG in another markdown editor” (could be there, of course, but I’ve not seen one) — but now I’ve spent a couple of hours testing the permutations, it seems a shame not to make the info available in case someone else is wondering.

2 Likes

Thank you @chrillek for the notes. I appreciate it.

Yes, I’d been hoping that the relative links would still work in iOS as all of my files are indexed from iCloud. “Open in…” seems to be the culprit there.

When I get some time I’ll try to build a shortcut that will open the current DDTG document in IA Writer “natively”. When I get some time…

(By the way. Relative file links work in DT for navigation, but do not have the same context menu options as item links do. Unfortunate, but I’m thinking the file links are more future-proof.)

What would be useful is a 3rd party keyboard with markdown support. I did find one in the App Store:

But the reviews are terrible, probably because it’s abandonware.

We actually have that in our list of potential future enhancements. :slight_smile:

8 Likes

:heart: Ah! I was just wondering about this. A good markdown keyboard would be a fantastic addition and would make DTTG even better for me!

Oh how I wish DEVONthink could use the new Bear.app (Panda alpha editor) it’s just amazing. Only
If some how the two companies could come together :wink:

6 Likes

This is by far the best idea I read this year…

1 Like

Thank you for the pointer, @Miwagner1 . Just downloaded it, pretty impressive indeed.

Panda Bear

Indeed this looks super interesting. Thank you for the information.

But according to “the two companies come together”: With Panda there wouldn’t even be a need to “come together” as Panda works with files openly available in the iOS files system. And on cloud drives too—and of course files in a file providing app like DTTG.

But as I understand the developers this only goes for the beta phase of the editor part of Bear. There is no hint that Bear itself won’t be keeping its notes locked in its own database like the present version once the Panda editing engine is integrated in it.

You got that correctly. Panda is just an alpha/beta version of Bear’s editor. Once it’s finalised, it is going to get integrated into Bear and I doubt it will remain available as a stand-alone app any longer. There have been no hints from the Bear development team that this would be the case.

I also wish Bear would support external folders, much like Ulysses, which would then perhaps enable its use as an external editor (regardless of the fact that it stores its notes in the database, just like Ulysses again), but again, there have been no hints from the development team that they are willing to support that or that this is being worked on.

The development of Bear is going pretty slowly (Panda has been mentioned as being worked on 2+ years ago, it should have been released by the end of 2019 (!) and it’s only just now in public beta) so as much as I like and use Bear for some of the notes, I don’t think we’ll be able to use it as an editor alongside DT anytime soon.

So, this is my current :blue_heart: DTTG markdown dream…:blue_heart:

3 Likes

I just found an amazing open source MIT license project………

  • Markdown-first. Also supports any plaintext and RTF files.

  • Syntax highlighting within code blocks. Supports over 170 programming languages.

  • In-line image support.

  • TextBundle and EncryptedTextBundle containers.

Please implement this holy grail into devonthink!!!

That’s a full blown app, not just an editor framework :thinking:

indeed but with a scalpel and some care, saves a lot of work does it not? The FSNotesCore looks to be nicely separated

That’s out of my wheelhouse. @eboehnisch would have to weigh in on this.

if you just want a nice little framework that might be ideal