Hi
This is happening in Windows but I am sure it also happens in my Linux version too
When I drag and drop a photo or figure from an application,e.g. XnView MP (Newly found, for me anyway, excellent alternative for Shotwell in Windows) into a note in Joplin (using native markdown editor or whatever its called) it all works but I get three (Edit: I originally said four but miscounted, thanks @graphit0 ) empty lines above and below each entry line which is a slight pain as it spreads out the markdown and I have to delete the empty lines
I think default behaviour is 1 empty line above and below the image you drag'n'drop. To me it seems like the app is inserting into clipboard those empty lines for some reason. Does any other application behave similarly with Joplin drag'n'drop?
Ok, I could reproduce it some similar behaviour but it's more like 3 lines between each image.
Before drag'n'drop
note-text [cursor]
After drag'n'drop
note-text
[empty line #1]
attachment markdown link1 ()
[empty line #2]
[empty line #3][cursor]
I believe there are 3 empty lines around the attachment in total for a few reasons:
[empty line#1] to prevent attachment to be blurred with the note text, which would result in a unrendered attachment
[empty line#2] avoid accidentally merging markdown link with the text following after it.
[empty line#3] to prevent placing cursor exactly to the right from the attachment: on the [empty line#2] where no text should fit if rendered
If you repeat the drag'n'drop you'll get 3 empty lines in the row between the attachments
After second drag'n'drop
note-text
[empty line #1]
attachment markdown link1 ()
[empty line #2]
[empty line #3]
[empty line #4]
attachment markdown link2 ()
[empty line #5]
[empty line #6][cursor]
It's happening because each image is inserted separately hence each of them get their empty lines above and below.
It's basically expected behaviour but I see your point that it would be nice to recognise there are several files incoming via drag'n'drop and place only 1 empty line between the attachments:
Expected behaviour: multiple files drag'n'drop
Before drag'n'drop
note-text [cursor]
After drag'n'drop
note-text
[empty line #1]
attachment markdown link1 ()
[empty line #2]
attachment markdown link2 ()
[empty line #3]
[empty line #4][cursor]
As a temporary workaround for now, you can use rich text editor for drag'n'dropping of attachments, it will trim extra empty lines between the files.
Thanks @graphit0
Yes, that's what I will do, or just delete the lines afterwards
Like I said, not a big deal, I was just flagging it up in a bid to be helpful and wondered if I was doing anything wrong