Skip to content

How to customize drag and drop handling? #36

Answered by petyosi
Kebab11noel asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @Kebab11noel,

Thank you for giving the editor a try! Based on what you're saying, I assume that you would rather store images as markdown directives and not as html tags (or markdown images).

To do so, you don't need to customize the drag and drop handling, but rather tap into the markdown processing itself and swap the way images are handled. Here's an example of a plugin that does that. Notice however, that the images are inline elements. So I am using the TextDirective :img rather than the leaf (block) ::img.

Let me know if I got that right or if you need any further help.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Kebab11noel
Comment options

Answer selected by Kebab11noel
Comment options

You must be logged in to vote
1 reply
@Kebab11noel
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants