tinymce.full.js
function (settings) {
          var buttons, callback = settings.callback || function () { };

          function createButton(text, status, primary) {
            return {
              type: "button",
              text: text,
              subtype: primary ? 'primary' : '',
              onClick: function (e) {
                e.control.parents()[1].close();
                callback(status);
              }
            };
          }

          switch (settings.buttons) {
            case MessageBox.OK_CANCEL:
              buttons = [
                createButton('Ok', true, true),
                createButton('Cancel', false)
              ];
              break;

            case MessageBox.YES_NO:
            case MessageBox.YES_NO_CANCEL:
              buttons = [
                createButton('Yes', 1, true),
                createButton('No', 0)
              ];

              if (settings.buttons == MessageBox.YES_NO_CANCEL) {
                buttons.push(createButton('Cancel', -1));
              }
              break;

            default:
              buttons = [
                createButton('Ok', true, true)
              ];
              break;
          }

          return new Window({
            padding: 20,
            x: settings.x,
            y: settings.y,
            minWidth: 300,
            minHeight: 100,
            layout: "flex",
            pack: "center",
            align: "center",
            buttons: buttons,
            title: settings.title,
            role: 'alertdialog',
            items: {
              type: "label",
              multiline: true,
              maxWidth: 500,
              maxHeight: 200,
              text: settings.text
            },
            onPostRender: function () {
              this.aria('describedby', this.items()[0]._id);
            },
            onClose: settings.onClose,
            onCancel: function () {
              callback(false);
            }
          }).renderTo(document.body).reflow();
        }
function (settings) {
          var buttons, callback = settings.callback || function () { };

          function createButton(text, status, primary) {
            return {
              type: "button",
              text: text,
              subtype: primary ? 'primary' : '',
              onClick: function (e) {
                e.control.parents()[1].close();
                callback(status);
              }
            };
          }

          switch (settings.buttons) {
            case MessageBox.OK_CANCEL:
              buttons = [
                createButton('Ok', true, true),
                createButton('Cancel', false)
              ];
              break;

            case MessageBox.YES_NO:
            case MessageBox.YES_NO_CANCEL:
              buttons = [
                createButton('Yes', 1, true),
                createButton('No', 0)
              ];

              if (settings.buttons == MessageBox.YES_NO_CANCEL) {
                buttons.push(createButton('Cancel', -1));
              }
              break;

            default:
              buttons = [
                createButton('Ok', true, true)
              ];
              break;
          }

          return new Window({
            padding: 20,
            x: settings.x,
            y: settings.y,
            minWidth: 300,
            minHeight: 100,
            layout: "flex",
            pack: "center",
            align: "center",
            buttons: buttons,
            title: settings.title,
            role: 'alertdialog',
            items: {
              type: "label",
              multiline: true,
              maxWidth: 500,
              maxHeight: 200,
              text: settings.text
            },
            onPostRender: function () {
              this.aria('describedby', this.items()[0]._id);
            },
            onClose: settings.onClose,
            onCancel: function () {
              callback(false);
            }
          }).renderTo(document.body).reflow();
        }
function ( settings ) { var buttons , callback = settings . callback || function ( ) { } ; function createButton ( text , status , primary ) { return { type : "button" , text : text , subtype : primary ? 'primary' : '' , onClick : function ( e ) { e . control . parents ( ) [ 1 ] . close ( ) ; callback ( status ) ; } } ; } switch ( settings . buttons ) { case MessageBox . OK_CANCEL : buttons = [ createButton ( 'Ok' , true , true ) , createButton ( 'Cancel' , false ) ] ; break ; case MessageBox . YES_NO : case MessageBox . YES_NO_CANCEL : buttons = [ createButton ( 'Yes' , 1 , true ) , createButton ( 'No' , 0 ) ] ; if ( settings . buttons == MessageBox . YES_NO_CANCEL ) { buttons . push ( createButton ( 'Cancel' , - 1 ) ) ; } break ; default : buttons = [ createButton ( 'Ok' , true , true ) ] ; break ; } return new Window ( { padding : 20 , x : settings . x , y : settings . y , minWidth : 300 , minHeight : 100 , layout : "flex" , pack : "center" , align : "center" , buttons : buttons , title : settings . title , role : 'alertdialog' , items : { type : "label" , multiline : true , maxWidth : 500 , maxHeight : 200 , text : settings . text } , onPostRender : function ( ) { this . aria ( 'describedby' , this . items ( ) [ 0 ] . _id ) ; } , onClose : settings . onClose , onCancel : function ( ) { callback ( false ) ; } } ) . renderTo ( document . body ) . reflow ( ) ; }
Constructs a new message box and renders it to the body element.

@static
@method msgBox
@param {Object} settings Name/value object with settings.
Constructs a new message box and renders it to the body element .