If you are not interest in the backlink issue, you can just use “part 1” of the Applescript that I posted in this forum post (don’t use the version in the original post, but the one I added a few replies down; just delete everything from the comment “part 2” to the end, and you have a script that takes the list of selected markdown files and copies the source into a custom field).
If you are interested in backlinks, you should use @pete31’s script instead.