document.addEventListener(
    'DOMContentLoaded',
    function () {
        codeFormatter('.content');
        microlight.reset();
    }
);

document.addEventListener(
    'DOMContentLoaded',
    function () {
        document.querySelector('button').addEventListener(
            'click',
            function () {
                codeFormatter('.content');
                microlight.reset();
            }
        );
    }
);

Make demo use a button for initiation.