Plugin dev pointers needed: re-formatting links as buttons



I’m looking for some high-level guidance on approach to building a link formatting plugin.

The plugin should automatically display links to a particular web resource (matching a given regular expression) as a button.

Essentially, when someone includes a URL in a post matching a specific pattern, like this:


…the post should appear as if they had used the following markdown:


I’m not sure at what point in the code I should be performing my link identification RegEx and modifying the output.

Should I be doing this through a…

  • Dialect?
  • Linkify rules extension/schema?
  • Markdown-it text replacement?
  • Nokogiri link extraction and modification?

Appreciate if someone could point me in the right direction.



(Mittineague) #2

Hi sjd333 welcome to the forum

If all you want to to do is style certain links, all you need to do can be done with CSS


Oh, fantastic! Thanks for getting back to me. That is a much simpler route to go down, so will go with that. Will report back once I’m done case I can help someone to achieve a similar result.