# Plugin dev pointers needed: re-formatting links as buttons

**URL:** <https://meta.discourse.org/t/plugin-dev-pointers-needed-re-formatting-links-as-buttons/76750>\
**Category:** Development\
**Created:** [December 25, 2017, 11:58pm UTC](https://meta.discourse.org/t/plugin-dev-pointers-needed-re-formatting-links-as-buttons/76750 "2017-12-25T23:58:48Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![sjd333](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sjd333/32/120439_2.png) [@sjd333](https://meta.discourse.org/u/sjd333)\
**Post date:** [December 25, 2017, 11:58pm UTC](https://meta.discourse.org/t/plugin-dev-pointers-needed-re-formatting-links-as-buttons/76750/1 "2017-12-25T23:58:48Z")

</div>

Hi,

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:

```plaintext
http://mysite.domain/specific/path/

```

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

```plaintext
[![Foo](my-button.png)](http://mysite.domain/specific/path)

```

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?  
(md.core.textPostProcess.ruler)
- Nokogiri link extraction and modification?

Appreciate if someone could point me in the right direction.

Thanks

Sam

---

_[View the full topic](https://meta.discourse.org/t/plugin-dev-pointers-needed-re-formatting-links-as-buttons/76750)._
