Discourse OneCompiler Code Runner

:information_source: Summary Run codeblock code with a OneCompiler embded
:hammer_and_wrench: Repository GitHub - NateDhaliwal/Discourse-OneCompiler-Code-Runner
:question: Install Guide How to install a theme or theme component
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

Description

This component allows you to run code in codeblocks. This may not be applicable to every scenario, though, so not all code can be run.

This uses OneCompiler to embed code editors using iFrames. OneCompiler supports many languages, but not all are supported in this Theme Component. For example, this does not support CSS frameworks, since only 1 codeblock ↔ 1 file.

Screenshots

Fullscreen code modal:

Code editor loaded and run:

Settings

default_file_name: The filename of the file in the OneCompiler embedded editor. Defaults to main.

show_language_switcher: Show the language switcher to change the language of the embedded editor. Defaults to false.

show_create_new_file_button: Show the + button to add new files of the same language, or to add dependencies to the project, where applicable. Defaults to true.

3 Likes