Skip to content

How to change code from JS #191

@voidowl-rl

Description

@voidowl-rl

I use KotlinPlayground in a small project to show students code and allow them to edit it (without the hassle to deal with any special code editors). It works great so far - thanks for this great tool.

However, I want to change the code in an existing KotlinPlayground instance (received by using getInstance) programmatically from JavaScript. I tried instance.update({code: "..."}) and to reinitialize the playground but none of the approaches worked. Is there an (easy) way to do this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions