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:       '#2196F3',
    callback: function (panel) {
        var editor = editormd("editormd", {
            path : "../../../js/editor.md-master/lib/" // Autoload modules mode, codemirror, marked... dependents libs path
        });
        $('#editormd').css('margin-bottom', 0);
        $('#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)'});
}