droppedcode / typedoc-plugin-copy-assets

Typedoc plugin that copies the assets found in comments to the output assets folder.
MIT License
3 stars 1 forks source link

feat: HTML src img #4

Closed carlocorradini closed 9 months ago

carlocorradini commented 9 months ago

Copy the image specified by the src property in a img HTML tag:

<img src="path/to/image.png" alt="Image" />

In markdown files, this occurs frequently. Thanks 🥳

droppedcode commented 9 months ago

I'm not sure about how frequently there is a html img tag in a markdown file and I need to mention it that is not really recommended to use it, there is markdown image links ![foo](bar.baz) as an option.

But who am I to disagree and it was an easy addition so with version 1.0.11, you can now set the option copyHtmlImgTag to true and copy and change the paths. For more finer control addition options was added see use in the readme file.

Full supported example can be seen in tests\typedoc-plugins-example\src\module-1\README.md, see readme file debug part how to run it.

carlocorradini commented 9 months ago

@droppedcode Wonderful! You quickly modified it! Thanks! It's standard practice to use <img src="path/to/image" ...> rather than [...](path/o/image) if you want to align or set the width and height: