Skip to content

need for mergeHtmlAndAttachment in markdown resolved() method? #67

Open
@jywarren

Description

@jywarren

I'm loving the new options.mergeHtmlAndAttachment ability to intercept and custom-format attachments --

parts = options.mergeHtmlAndAttachment(chunks, link);

We have done so for a custom rendering of CSV files, for example, with the following code:

https://github.com/publiclab/PublicLab.Editor/blob/f5f5492e5188963b0d6b672fc60093cef34c065c/src/adapters/PublicLab.Woofmark.js#L144-L146

However, this only works in HTML mode, not markdown mode. So when dragging in an attachment in HTML mode, this custom formatter works great. But in markdown mode it is rendered as:

  [attachment-1]: /system/images/photos/000/024/808/original/114634.csv "114634.csv"

Do we need to port the mergeHtmlAndAttachment method implementation from /html/linkOrImageOrAttachment.js over to /markdown/linkOrImageOrAttachment.js to get this working in both modes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions