bevacqua / woofmark

:dog2: Barking up the DOM tree. A modular, progressive, and beautiful Markdown and HTML editor
https://bevacqua.github.io/woofmark
MIT License
1.62k stars 74 forks source link

initial stab at submitting image/attachment formData via bureaucracy #40

Closed jywarren closed 7 years ago

jywarren commented 7 years ago

This is a first-draft attempt to solve #38 -- not sure if it's architecturally the right approach, but I believe it will pass a formData object from the images method all the way to the bureaucracy v1.0.6, and it will get appended to the form submission. How does this look?

jywarren commented 7 years ago

Hmm, I think i made a mistake, sorry hang on.

jywarren commented 7 years ago

OK, fixed the especially dumb mistake -- but what's the best convention for passing a possibly undefined option? I set a default of {} but is that really necessary? Do we care if an undefined is passed over, or do we prefer to send over an empty object?

bevacqua commented 7 years ago

The argument should be optional so there shouldn't be a need to default to {}

bevacqua commented 7 years ago

It is optional in bureaucracy https://github.com/bevacqua/bureaucracy/blob/master/bureaucracy.js#L29

jywarren commented 7 years ago

Great -- OK, how does that look?

jywarren commented 7 years ago

Hi, just checking if there's anything else I can do to prep this PR, of if you could pull it in and make a release? Thanks!

bevacqua commented 7 years ago

LGTM