function initPreviewDialog() {

    $("#previewDialog").dialog({
        autoOpen: false,
        resizable: true,
        modal: true,
        height: 500,
        width: 1000,
        resizeStop: function () {
            $('#previewDialog').css('width', '100%');
        }
    });

    $("#previewOpen").click(function () {

        finalPreview('previewDialogIn', [], false);

        setTimeout(function () {
            $("#previewDialog").dialog("open");
            if (loadMermaid) {
                mermaid.init(undefined, ".mermaid");
            }
        }, 1000);
    });

}
/**
 * Initialize #previewDialog and set #previewButton to open final preview.
 */
Initialize #previewDialog and set #previewButton to open final preview.
Initialize #previewDialog and set #previewButton to open final preview .
function initPreviewDialog() {
    $("#previewDialog").dialog({
        autoOpen: false,
        resizable: true,
        modal: true,
        height: 500,
        width: 1000,
        resizeStop: function () {
            $('#previewDialog').css('width', '100%');
        }
    });
    $("#previewOpen").click(function () {
        finalPreview('previewDialogIn', [], false);
        setTimeout(function () {
            $("#previewDialog").dialog("open");
            if (loadMermaid) {
                mermaid.init(undefined, ".mermaid");
            }
        }, 1000);
    });
}
function initPreviewDialog ( ) { $ ( "#previewDialog" ) . dialog ( { autoOpen : false , resizable : true , modal : true , height : 500 , width : 1000 , resizeStop : function ( ) { $ ( '#previewDialog' ) . css ( 'width' , '100%' ) ; } } ) ; $ ( "#previewOpen" ) . click ( function ( ) { finalPreview ( 'previewDialogIn' , [ ] , false ) ; setTimeout ( function ( ) { $ ( "#previewDialog" ) . dialog ( "open" ) ; if ( loadMermaid ) { mermaid . init ( undefined , ".mermaid" ) ; } } , 1000 ) ; } ) ; }
Initialize #previewDialog and set #previewButton to open final preview.
Initialize #previewDialog and set #previewButton to open final preview .