comrak icon indicating copy to clipboard operation
comrak copied to clipboard

Provide custom image adapter

Open lucperkins opened this issue 1 year ago • 2 comments

Akin to issues #253 and #267, I like to provide custom image rendering whenever possible. To give an example, I often like to wrap the image in a figure element, display the title as a figcaption, and make the image clickable. Basically turning this...

![My caption)(/img/foo.png)

...as this:

<figure>
  <a href="/img/foo.png" target="_blank">
    <img src="/img/foo.png" />
  </a>

  <figcaption>
    My caption
  </figcaption>
</figure>

One of many possible use cases, of course, but nice to have. As with #257 and #266 I will submit a PR.

lucperkins avatar Jan 07 '23 19:01 lucperkins