How to use kotlin playground in my discourse?


#1

just like this gif:


#2

Your gif shows how to do it :wink: You can format code by enclosing it in 3 Grave Accents ("```" I think they are called that) each on a single empty line.
You can specify the programming language after the first three accents. The name for the interactive enviroment is “run-kotlin”. You need to specify a main function for it to work. Also you can decide to only show part of the code by using //sampleStart and //sampleEnd.

fun main(args: Array<String>){
//sampleStart
println("hello world")
//sampleEnd
}

#3

Sorry, i didn’t mean that.
I build a forum with discourse, and i want to add kotlin playground to the editor. But i have not found any discourse plugins like wp-plugin.
Thanks for your answer. :hugs: