I am writing some documentation in Pandoc Markdown, and I would like a diagram to have selectable text in both the HTML and PDF output. I made the diagram in draw.io, so I can export it as a PDF or SVG.
Suppose I have the following Pandoc Markdown document:
# Introduction

If I compile the following with pandoc doc.md -o doc.html, the diagram's text is not selectable in the HTML site.
The SVG by itself does have selectable text though.
If I compile with pandoc doc.md -o doc.pdf, the diagram's text is not selectable in the resulting PDF.
On the other hand, if I export the diagram as a PDF, the diagram's text is selectable in the HTML site, but only through a PDF reader which make it kind of ugly.
The text is selectable in the PDF with no issues though.
I was thinking of writing a Pandoc filter to use the svg tag instead of the img tag in the HTML, but that still wouldn't solve it not being selectable in the PDF. Does anyone know if this is possible?