Self-contained component to embed in websites for running Kotlin code.
Run npm start
which will invoke webpack
and set up an internal development server.
Run webpack
and copy the output of the dist
folder to your scripts folder.
Wrap any code you want in a box in a div tag. Use markdown=1 if it's markdown input.
```kotlin
fun main(args: Array) {
println("Hello")
}
```
All that code will appear in an editable box. If you want to highlight a specific area to focus on a specific sample, use //sampleStart and //sampleEnd
```kotlin
//sampleStart
fun message(input: String) {
println(input)
}
//sampleEnd
fun main(args: Array) {
message("Hello")
}
```