Skip to content

How to make JavaScript code examples runnable? #1453

Open
@rpearce

Description

@rpearce

Hi! Thanks for this great project.

Is there a way to run editable and runnable JS examples like the Rust ones? It seems those go to a remote location, which could be doable with a nodejs backend somewhere, but I'm not sure how to do that in mdBook.

Is there a configuration option somewhere for what backend to send requests to? Is it something to do with Ace? Do I need a different editor entirely?

My use case: I'm writing a small book on ramda.js and want to have runnable examples of that but without having to pull in runkit or some other such thing.

I'm sure other people would want backends for Go, Python, Ruby, etc., too!

Thanks for your time. 💜

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions