Browser APIs
code(className = "code-blocks-selector") {
attribute("data-highlight-only", "nocursor")
attribute("theme", "darcula")
attribute("auto-indent", "true")
attribute("mode", "kotlin")
attribute("lines", "false")
+"""
class App : Application() {
override fun start() {
}
}
fun main() {
startApplication(::App)
}
""".trimIndent()
LaunchedEffect(Unit) {
if (renderConfig.isDom) { // This will be executed only when running in the browser
KotlinPlayground(".code-blocks-selector")
}
}
}Last updated