Skip to content

Support relative image directory #549

Closed

Description

@ti

drop image insert by copy it to local .${filename}.assets/ support

the current version of the marktext is upload to cloud, but in this opensource project, upload cloud is a danger tings, the new feature of copy it to local .${filename}.assets/ would be make a greate process

Activity

  1. changed the title [-]drop to copy image to local {file_name}.assets/ folder support[/-] [+]drop to copy image to local {file_name}.assets/ folder support [feature request][/+] on Nov 8, 2018
  2. changed the title [-]drop to copy image to local {file_name}.assets/ folder support [feature request][/-] [+]drop to copy image to local {file_name}.assets/ folder support[/+] on Nov 8, 2018
  3. Jocs commented on Nov 8, 2018

    @Jocs
    Member

    We'll add an image manager to manage to local image and uploaded image in the future. User can choose use local image or uploaded image.

    User can also use image upload plugin when the plugin system supported.

  4. added
    🦄 feature request
    on Apr 17, 2019
  5. self-assigned this
    on May 7, 2019
  6. reopened this on May 26, 2019
  7. fxha commented on Aug 10, 2019

    @fxha
    Contributor

    Please see #1232 when implementing this feature to allow both, a resource directory per markdown file and per directory, controlled by a settings option.

  8. HannanAkbar commented on Aug 17, 2019

    @HannanAkbar

    I would add that creating a resource directory should be optional, not forced upon.
    Maybe show a dialog with <Move> <Move to directory>.

    Slightly cleaner and easier this way. #1279

  9. HannanAkbar commented on Aug 17, 2019

    @HannanAkbar

    A quick suggestion:

    Avoid messing with files/folders as much as possible. That kills the spirit of an editor and ends up in a proprietary format notepad. The best way is to give extensions for any feature which is out of scope, extra, or changes the structure, format, etc.

  10. changed the title [-]drop to copy image to local {file_name}.assets/ folder support[/-] [+]Support relative image directory[/+] on Jan 30, 2020
  11. GregHilston commented on Feb 5, 2020

    @GregHilston

    This is the only feature I think Mark Text is missing to be competitive with VS Code extensions or even Notion.

    I'll try to dig through and see if I can be of any assistance, as having this would allow the "self hosting" note takes the ability to easily control their notes.

  12. redoxmatlab commented on May 6, 2020

    @redoxmatlab

    Is there any updates on this issue?
    I am not sure what "move image to special folder" does?

    Thanks

  13. elvis-wenhao-wu commented on Jul 11, 2020

    @elvis-wenhao-wu

    +1. Add image path variable similar to that in Typora, or at least relative path to marktext. This is the only concern that drives me not to change from Typora to marktext at the moment. Once marktext has this feature, then basically it defeats Typora.

  14. allpan3 commented on Aug 7, 2020

    @allpan3

    Just curious, even if relative path is supported for image insertion, how do you guys view notes on mobile devices? From my experience with Typora and multiple iOS apps (Pretext, MDNotes and MWeb), storing the entire file tree in iCloud still does not solve the issue. Images are not able to be found with relative path. See this issue in Typora for a little more detail.

  15. brainchild0 commented on Aug 27, 2020

    @brainchild0
  16. pinned this issue on Aug 28, 2020
  17. ytianxia6 commented on Sep 16, 2020

    @ytianxia6

    Has this problem been solved? I am considering migrating from typora to mark text, but if this problem cannot be solved, I may not be able to migrate.
    I often use to edit the wiki library of gitlab. Pictures can only be saved in relative paths.

  18. ldmik commented on Sep 25, 2020

    @ldmik

    hi guys, any update of this feature? Such a Highest-rated feature is really important.

  19. mimavox commented on Dec 8, 2020

    @mimavox

    Just curious, even if relative path is supported for image insertion, how do you guys view notes on mobile devices? From my experience with Typora and multiple iOS apps (Pretext, MDNotes and MWeb), storing the entire file tree in iCloud still does not solve the issue. Images are not able to be found with relative path. See this issue in Typora for a little more detail.

    Using MWeb on mobile with Typora on desktop works flawlessly if you set Typora custom folder to ./media (which MWeb uses). That way each image is stored in a media subfolder of the current directory and a correct relative path is added to the document.

    (Edit: This works with Dropbox sync. Don't know about iCloud.)

  20. unpinned this issue on Dec 27, 2020
  21. fgimian commented on Jan 8, 2021

    @fgimian

    Really appreciate the effort on this, but the current implementation is still not quite as good as Typora for the following reasons:

    • Mark Text only offers the ability to store all images for multiple Markdown files in a relative directory (e.g. assets), unlike Typora which allows you to create one directory per document (e.g. ./${filename}.assets). I much prefer the latter approach as it keeps each individual document separate with its own dedicated directory for images. If you had for example 20 Markdown files, and each had images, these would all be put into a single folder with Mark Text, which makes it harder to move pages to a different location and also leads to a messier filesystem.
    • Typora has an option "Use relative path if possible" which is critical. It will insert a relative path to the file instead of an absolute path. This means that if you move the document and its images to a different location, images continue to work. Mark Text only seems to insert absolute paths which makes it very hard to move things around.
    • The editor should really prompt you to save a file if unsaved and an image is dropped rather than defaulting to a central directory. It's so easy for images to get lost with the current system imho and it's an easy thing to miss.

    Any chance you can improve this feature further to support the points above please?

    Thank you so much!
    Fotis

  22. Merrit commented on Jan 8, 2021

    @Merrit

    @fgimian Exactly the points I haven't had time to write up about. Also a big issue for me.

  23. fxha commented on Jan 25, 2021

    @fxha
    Contributor

    Mark Text only offers the ability to store all images for multiple Markdown files in a relative directory

    This should be very easy to implement, but it doesn't make things easier - UX wise. My core idea was to implement such features per directory (project) via a custom configuration file, like VSCode, and a session management (#988). Many core features, such as sessions, are blocked because we need to optimize the core engine and due to financially support. Currently, there isn't an active maintainer to solve these issues or take care about new issues. We published two bug fix releases in 2020 with some outstanding features in a few weeks but there was no overall progress on the project. On the pro side, we have a partially working engine internally that should be flexible enough to solve further issues and features, but without any progress in the last year. To sum up, we need some old stuff fixed before continuing on new features, but without any financially support there will only be a few changes in the further. Mark Text was always a community maintained project and for the time being, I'm done from maintaining open-source for free and hope we can continue this awesome project somehow.

    Mark Text only seems to insert absolute paths which makes it very hard to move things around.

    A relative path should be used if the file is persistent on disk. Please open an issue with detailed steps to reproduce.

    The editor should really prompt you to save a file if unsaved and an image is dropped rather than defaulting to a central directory. It's so easy for images to get lost with the current system imho and it's an easy thing to miss.

    I think you're right, the image management need some overall improvements.


    @fgimian Could you please open separate issues to address these problems, thanks!

  24. fgimian commented on Apr 16, 2021

    @fgimian

    Apologies that I kinda forgot about this issue. I've just created separate issues for each point above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🦄 feature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions