# Plugin to add button to post content

**URL:** https://meta.discourse.org/t/plugin-to-add-button-to-post-content/143463
**Category:** Development
**Created:** [March 5, 2020, 11:17pm UTC](https://meta.discourse.org/t/plugin-to-add-button-to-post-content/143463 "2020-03-05T23:17:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![reoguy55](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/reoguy55/32/153662_2.png) [@reoguy55](https://meta.discourse.org/u/reoguy55)
#### Post date: [March 5, 2020, 11:17pm UTC](https://meta.discourse.org/t/plugin-to-add-button-to-post-content/143463/1 "2020-03-05T23:17:53Z")

</div>

Hello!

My discourse community is for a programming class, and we’ve been thinking about trying to develop our own plugin.

Our goal is to add a button to posts that contain fenced code blocks in Java (and eventually maybe Kotlin) that can package the fenced code and send it in a POST request to one of our servers so it can be compiled.

Right now we’re still in the brainstorming stage, but we’re wondering if there’s a way for our plugin to modify the contents of a post to insert HTML for a button.

Any advice/alternative approaches would be appreciated!

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 5, 2020, 11:28pm UTC](https://meta.discourse.org/t/plugin-to-add-button-to-post-content/143463/2 "2020-03-05T23:28:32Z")

</div>

Yes, a plugin can modify the contents of a post. My concern is how long it takes to compile the code, but I guess compilers are faster now than when I was compiling kernels 25 years ago.

You could have your process run when a post was saved and add the output to the raw post. Or so I think with very little time.
