just like this gif:
1 Like
Your gif shows how to do it 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
}
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.
1 Like