Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 839 Bytes

File metadata and controls

36 lines (27 loc) · 839 Bytes

kotlin-runcode

Self-contained component to embed in websites for running Kotlin code.

Setup for development

Run npm start which will invoke webpack and set up an internal development server.

Setup for end use

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") } ```