Zettlr: [ENHANCEMENT] Allow for automatic relative paths on images drag&drop

Created on 16 May 2020  Â·  7Comments  Â·  Source: Zettlr/Zettlr

Description

Inserting an image by drag&drop automatically creates an absolute path.
It'd be great to have an option to choose whether we want to insert the image with an absolute or relative path.

Proposed Changes

This could be done in two ways (possibly both):

  • globally in the settings: "On image insert use: _relative path | absolute path_"

    • an additional setting could be "ask me every time"

    • this could be applied to copied-pasted images (save-image-from-clipboard.js seems to do such a check line 49?)

  • and/or every time we insert an image, through a dialogue (as pasting an image does)

This would bring some consistency in the automatically created image links, because right now, depending on the method, I either get relative or absolute links.

enhancement help wanted pinned

All 7 comments

Bonjour, I just tested it out and for me it returns an absolute path in any case — could you describe which kind of drag and drop (from the sidebar, the finder, etc.) you make, so that I can try to reproduce this behaviour? Thanks!

Yes it does return an absolute path!

It's not a bug report, but a proposal: to have an option somewhere that allows us to choose whether we want image tags created from a drag & drop to be 1. Absolute or 2. Relative.

(maybe "depending on the method" was confusing - I meant that copy-paste creates relative links, while drag & drop creates absolute links ;))

Aaaaaaahh, now I see what you mean! Yeah, this should be fairly simple, and in fact, it's exactly the same process as for the one feature I implemented during the screencap I uploaded recently: https://www.youtube.com/watch?v=sa_ehm0yDEo&t=1738s

So if someone wants to have a shot at implementing a switch to toggle between absolute and relative paths (relative to the file), this should be fairly simple to do and I know there are people who want to get involved more :)

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Hush, stalebot! Hush!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically closed due to inactivity. If you believe that this issue is relevant for many users and should not be closed, feel free to comment so that the admins will be notified.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bit-hug picture bit-hug  Â·  4Comments

Alopex4 picture Alopex4  Â·  4Comments

Noisecommander picture Noisecommander  Â·  3Comments

danieltomasz picture danieltomasz  Â·  5Comments

volt4ire picture volt4ire  Â·  4Comments