Basic example

jsPanel.create({
    content:     '<div id="editormd">' +
                 '<textarea style="display:none;">### Hello Editor.md !</textarea>' +
                 '</div>',
    contentSize: '750 400',
    headerTitle: 'jsPanel with Editor.md',
    theme:       'primary',
    position:    'center-top 0 70',
    callback: function (panel) {
        var editor = editormd("editormd", {
            path : "../../../js/editor.md/lib/" // Autoload modules mode, codemirror, marked... dependents libs path
        });
        $('#btn-1').attr('disabled', 'disabled');
    },
    resizeit: {
        resize: function (panel) {
            resizeEditormd(panel);
        }
    },
    onmaximized: function (panel) {
        resizeEditormd(panel);
    },
    onnormalized: function (panel) {
        resizeEditormd(panel);
    },
    onclosed: function () {
        $('#btn-1').attr('disabled', false);
    }
});

// function to resize the editor area whenever panel is resized using mouse or maximize/normalize methods
function resizeEditormd(panel) {
    $('.CodeMirror-wrap, .editormd-preview', panel.content).css({height: 'calc(100% - 79px)', width: '50%'});
    $('.CodeMirror-gutters', panel.content).css({height: 'calc(100% - 13px)'});
}