Skip to content

Feature Suggest: Drop image to fast insert image #97

Description

@DIYer22

Mark Text is real awesome, and I want to Suggest a feature that could fast insert image

Description

Drop a image to text editor.
After that, Mark Text auto insert image to corresponding line with image's relative path.

This feature could greatly improve efficiency for write Markdown which include lots images.

Activity

  1. Jocs commented on Mar 29, 2018

    @Jocs
    Member

    Now we have drop and upload to SM, But it's not stable, Because SM is a free picture cloud.

    Maybe drop and insert relative path is a good idea.

  2. Jocs commented on Mar 29, 2018

    @Jocs
    Member

    There are two problem:

    1. There is no relative path when file is not saved.
    2. The cursor is hard to control when you drag image to Mart Text directly.
  3. DIYer22 commented on Mar 29, 2018

    @DIYer22
    ContributorAuthor

    我还是用中文交流吧, 这样清晰一点

    免费图片云可能会倒闭,或突然加上限制。
    这样的话 原来写的markdown 就废掉了
    所以 我建议 在设置里面加一项drop image配置 让用户自行选择传到CM 上 还是用 path来插入图片

    选用path 的话

    如果发觉文件没有保存 就直接提供绝对路径
    对于明显和markdown文件不属于同一文件夹的图片 也直接提供绝对路径
    (如果觉得这种智能化的设置会使用户迷惑, 还有办法就是 直接在drop image配置中 设置upload CM,relative path,abspath3个选项)

    对于 problem 2

    可以退一步来实现:
    一旦把图片 drop 到当前窗口, 就直接在光标处插入 ![](path)

  4. Jocs commented on Mar 29, 2018

    @Jocs
    Member

    针对免费的图片问题

    以后可能会增加配置,用户可以自行添加私有的图片云服务,使用自己的图片云。应该在 v1.0.0 版本前会增加私有云配置吧。

    针对选用 path 问题

    现在 Absolute Path 和 Relative Path 都是直接调用了系统的 对话框。可能添加拖拽弹窗,类似现在上传图片的弹窗一样,用户可以选择打开系统对话框还是直接拖入图片。让用户自行选择使用绝对路径还是相对路径。如果没有保存,没有相对路径就直接使用绝对路径。

    如果都给一个拖拽的遮罩,就不会存在光标问题了。

  5. DIYer22 commented on Mar 29, 2018

    @DIYer22
    ContributorAuthor

    感谢! 拭目以待!

  6. yhcharles commented on Apr 23, 2018

    @yhcharles

    Another suggestion:

    To paste images into markdown, I found this implementation is quite convenient:
    https://atom.io/packages/markdown-img-paste

    Which allows user take a screenshot, then use "Ctrl+Shift+V" to paste the image into markdown. It actually creates and saves the image file in the same directory of markdown file. So you don't have to save it yourself.

  7. d4em0n commented on Apr 30, 2018

    @d4em0n

    Maybe image that paste into markdown will be automatic upload to imgur ?, so we don't need reupload our image into web/internet.

  8. Jocs commented on Apr 30, 2018

    @Jocs
    Member

    @d4em0n If YOU select upload to cloud, the image will be automatically upload to a free image cloud service.

  9. added
    🐼 pluginyou can write a plugin of Mark Text to implement this feature in the future
    on Jun 20, 2018
  10. added a commit that references this issue on May 13, 2026
    85607dd
  11. added a commit that references this issue on Jun 21, 2026
    5729066
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐼 pluginyou can write a plugin of Mark Text to implement this feature in the future

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions