Generalized drag and drop image upload in markdown