showdownjs / showdown

A bidirectional Markdown to HTML to Markdown converter written in Javascript
http://www.showdownjs.com/
MIT License
14.19k stars 1.56k forks source link

Feature: Allow appending custom html attributes. #958

Open georgeiliadis91 opened 1 year ago

georgeiliadis91 commented 1 year ago

I believe it would be a good idea to allow the user to choose and append custom attributes to selected html tags.

Anything from class names to attributes. An example would we allowing the user to set lazy loading on images allowing more control on markdown that is received.

<img loading="lazy .... />"

heychazza commented 1 year ago

+1 would tie in well with https://github.com/showdownjs/showdown/issues/964

thdoan commented 1 year ago

I was going to create a new ticket until I saw this. I think this would allow us to add rel="noopener noreferrer" target="_blank" to specific links.

XolifyDev commented 1 year ago

is this being made?