DEV Community

Marcus Chukwuoma
Marcus Chukwuoma

Posted on • Updated on

How to customise markdown anchor tags

Customising anchor tags in a markdown file can be daunting when adhering to markdown syntaxes.
For example [click-here](url) will generate a corresponding anchor tag <a href='url'>click-here </a>, this makes it difficult to add customisations such as.

  • Opening external links in a new tab, while local links retain default behaviour (opens on same tab)
  • Adding attributes to the anchor tags
  • Adding className links so as to do more customisation with CSS and JavaScript.

So, I have created an NPM package to solve this challenge. Check it out https://www.npmjs.com/package/customise-links

Top comments (0)