Skip to content

register yank-media-handler so we can paste images #804

@unhammer

Description

@unhammer

Expected Behavior

When an image is in the clipboard, yanking/pasting should create a file with the image in the same dir (perhaps customizable) and add a markdown image link.

See https://yhetil.org/orgmode/[email protected]/ for examples of yank-media handlers (this issue prompted by https://old.reddit.com/r/emacs/comments/17alspd/intelligent_paste_in_emacs/k5fnuta/ )

Actual Behavior

It pastes the latest text instead (and messages Selection owner couldn’t convert: text/plain;charset=utf-8)

Steps to Reproduce

  1. Copy some image contents to clipboard
  2. M-x markdown-mode in emacs
  3. C-y

Software Versions

  • Markdown Mode: 2.4-dev
  • Emacs: 29.1
  • OS: Ubuntu 22.04.3 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions