Ok, this might not answer your question.
In your website code, you can embed a code snippet from onlinegdb.com using the <script> tag
Steps: (source: the official OnlineGdb blog)
We are excited to introduce runnable c/c++ code snippets. Now you can embed code snippets which can be executed from your website/blog. Here is live example of embded runnable code snippet.
Below are steps to embed runnable code snippets to your own website.
- Goto onlinegdb.com
- Write and test your code
- Click “Share” button
- Copy “Embed Code” link, which would look like code below.
<script src="//onlinegdb.com/embed/js/B1X6-oL-W"></script> - Paste it in your article/page of your website where you want to display runnable code.That's it. Now your readers can run your code snippets from your website.
Example:
I just made a quick python code to show you, you can't edit the code, but it would be a cool feature.
EMBED:
<script src="//onlinegdb.com/embed/js/SJ9vii3CD?theme=dark"></script>
Paste the embed in your website code and the embed will show up!
Hope this helped sorry to disappoint btw.
~ KKN :)
P.S
if this didn't work, maybe ask the question on stackoverflow.com.
Their are a lot of experienced people there