neutronX/django-markdownx

Can't add class or id to images

mjlabe opened this issue · 2 comments

I've tried various ways that work with some markdown editors:

![](/media/markdownx/2020/04/26/a18c21eb-cc02-4d0c-a2c9-428b3c7b76c1.jpg){#image}

![](/media/markdownx/2020/04/26/a18c21eb-cc02-4d0c-a2c9-428b3c7b76c1.jpg){:#image}

![Image](/media/markdownx/2020/04/26/d2f4ff19-67e0-4211-917c-2db1d8d204d4.jpg){image:#id}

But none of them work. Is this supported?

adi- commented

Of course it does. You need to use an extension https://python-markdown.github.io/extensions/attr_list/

OK, I see it is in the MARKDOWNX_MARKDOWN_EXTENSIONS (https://neutronx.github.io/django-markdownx/customization/#markdownx_markdown_extensions) section of the settings documentation. Thank you.