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

inserting options.images.formData for upload handling #38

Closed jywarren closed 5 years ago

jywarren commented 7 years ago

Hi, I'm hoping for some guidance on where to put this code most efficiently; not a high priority though. Related to https://github.com/bevacqua/bureaucracy/issues/2

I found that bureaucracy is in prompts/prompt.js and there's an opportunity to pass in an options object here:

https://github.com/bevacqua/woofmark/blob/b58efb794f7610c92d70bec435cfd021ab45673c/src/prompts/prompt.js#L111-L115

To link that to the options object in the woofmark constructor, looks like changes would be needed in these two lines (for two modes):

https://github.com/bevacqua/woofmark/blob/b58efb794f7610c92d70bec435cfd021ab45673c/src/html/linkOrImageOrAttachment.js#L27

https://github.com/bevacqua/woofmark/blob/b58efb794f7610c92d70bec435cfd021ab45673c/src/markdown/linkOrImageOrAttachment.js#L111

...then we can access editor.options on this line, passing it to linkOrImageOrAttachment():

https://github.com/bevacqua/woofmark/blob/b58efb794f7610c92d70bec435cfd021ab45673c/src/uploads.js#L35

If that looks good, I can do up a PR -- again, not super urgent. Thanks.

jywarren commented 5 years ago

I believe this is resolved, oops