# executor-editor

## Demo #1

    class Cake {
        constructor() {
            this.type = 'Cheesecake';
        }
    }

    console.log(new Cake());
    console.log('Applepie');

## Embed code #1

To get editor like Demo #1 use this code:

    <pre class="executor-editor" data-width="1000" data-height="400">
    class Cake {
        constructor() {
            this.type = 'Cheesecake';
        }
    }

    console.log(new Cake());
    console.log('Applepie');
    </pre>

    <script src="https://piecioshka.github.io/executor-editor/dist/executor-editor.js"></script>
    <script>ExecutorEditor.setup();</script>

## Demo #2

    function * generator() {
        yield 1;
        yield 2;
    }

    var gen = generator();

    console.log(gen.next());
    console.log(gen.next());
    console.log(gen.next());

## Embed code #2

To get editor like Demo #2 use this code:

    <pre class="executor-editor" data-font-size="26" data-auto-exec-delay="3000">
    function * generator() {
        yield 1;
        yield 2;
    }

    var gen = generator();

    console.log(gen.next());
    console.log(gen.next());
    console.log(gen.next());
    </pre>

    <script src="https://piecioshka.github.io/executor-editor/dist/executor-editor.js"></script>
    <script>ExecutorEditor.setup();</script>