PlaygroundConfig

Kotlin Playground embedding options. The top section mirrors the attributes defined by the Kotlin Playground library itself; the lower section controls the iframe wrapper kslides generates around it.

CSS declared via css is injected into the generated iframe's <head> — use it to tweak font size or editor height for the embedded Playground, not to style the surrounding slide.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Playground args attribute — command-line arguments passed when the code runs.

Link copied to clipboard

Automatically re-indent the code as the user types.

Link copied to clipboard

CSS injected into the generated Playground iframe's <head>. Commonly used to override .CodeMirror { font-size: ...; } to match the surrounding slide's typography.

Link copied to clipboard

Enable autocomplete in the Playground editor.

Link copied to clipboard

Toggle for Playground's "open in IDE" crosslink button.

Link copied to clipboard

When true, disables the Run button and just syntax-highlights the code.

Link copied to clipboard

Space-separated list of JS library URLs loaded before JS-target code runs.

Link copied to clipboard

Minimum Kotlin compiler version that must be available on the Playground backend.

Link copied to clipboard

Maximum output-pane height in pixels.

Link copied to clipboard

CodeMirror scrollbarStyle (e.g. "simple", "null").

Link copied to clipboard

Shorter editor height variant (pixels).

Link copied to clipboard

Execution target for the embedded code (e.g. JVM, JS, JUnit).

Link copied to clipboard

When true, collapses the editor behind a "Show code" button.

Link copied to clipboard
var from: Int

First line to display from the source file (1-based).

Link copied to clipboard

iframe height attribute. Default "250px".

Link copied to clipboard

Re-highlight code while it is being edited.

Link copied to clipboard
var indent: Int

Editor indentation width in spaces.

Link copied to clipboard

Values consumed by kslides itself (theme, highlight plugin, corner links, iframe sizing, etc.).

Link copied to clipboard

Show line numbers.

Link copied to clipboard

Highlight matching brackets in the editor.

Link copied to clipboard

Language/syntax mode the editor operates in.

Link copied to clipboard

Values that correspond to documented reveal.js config options.

Link copied to clipboard

When true, the generated Playground HTML is cached for the lifetime of the com.kslides.KSlides instance. Set to false only if the Playground content depends on runtime state that changes between requests.

Link copied to clipboard

Inline CSS applied to the iframe. Useful for adding borders while tuning layout.

Link copied to clipboard

Editor color theme.

Link copied to clipboard

Accessible title text for screen readers.

Link copied to clipboard
var to: Int

Last line to display from the source file (inclusive).

Link copied to clipboard

iframe width attribute. Default "100%".

Functions

Link copied to clipboard
fun css(block: CssBuilder.() -> Unit)

Append CSS (via the Kotlin CSS DSL) to the Playground iframe's stylesheet.

Link copied to clipboard
fun merge(other: AbstractConfig)

Copy all entries from other's maps into this config's maps. Later puts overwrite earlier ones.