Plugin to add button to post content

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!

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.

1 Like