Skip to content

Copy pasting image directly from clipboard to markdown file #627

Closed

Description

@dotm

Describe your feature request

Is it possible to directly copy-paste image from clipboard to markdown file using MarkText? Is this already implemented?

Steps:

  • Copy image to clipboard (using Ctrl+C, Windows' Snipping Tool/Screenshot, or Mac's Cmd+Shift+4)
  • Go to a markdown file in MarkText
  • Ctrl+V
  • File is automatically uploaded or stored in an asset directory (relative to the markdown file or in a dedicated directory for MarkText)
  • Link is automatically pasted to markdown file: ![xxx](link/to/image)

What problem does this feature solve? [optional]

I often add screenshot of math formula, illustration, etc. to my note and it's a pain to manually upload things every time I add them. This is the only thing that ties me to Evernote...

Additional context [optional]

I'm a mid-level javascript developer. I'd be happy to contribute for this feature if the maintainers are busy doing other things. If any maintainer can point me to the right files/resources, it'd be really helpful.

Thanks

Activity

  1. added
    🦄 feature request
    on Dec 26, 2018
  2. fxha commented on Jan 22, 2019

    @fxha
    Contributor

    This is a really useful feature but the problem is that our backend muya is pure Javascript, so we can use it in a normal web browsers, and we don't have access to the local filesystem nor the clipboard data. We would need a "portal"/blocking event to Electron to access the desktop clipboard or implement it as plugin. In fact, I would prefer a plugin because it would be much less work because then we can use Electron to get the data.

    You can find the paste handler here:

    ContentState.prototype.pasteHandler = function (event, type) {

    Let us see if we can add a temporary solution until we support plugins.

  3. Jocs commented on Jan 24, 2019

    @Jocs
    Member

    @dotm It's a useful feature, we'll take it into consideration when we refactor muya.

  4. self-assigned this
    on May 7, 2019
  5. Rishabh-malhotraa commented on Mar 7, 2020

    @Rishabh-malhotraa

    this does not work of you want to add more than one image file!

  6. ranjithmkumar commented on Jun 23, 2020

    @ranjithmkumar

    Sorry. May I know what is the current state of this feature?

  7. simondebbarma commented on Jan 7, 2022

    @simondebbarma

    Just passing by, trying to figure out how to implement this on my own on a personal project.

  8. ldraney commented on Jan 26, 2023

    @ldraney

    This would be a very useful feature

  9. syedamaann commented on Jan 16, 2024

    @syedamaann

    Hey, what's the currents state of this feature? If not, I'd like to contribute in this if directed to the right resources.

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