'Checkbox in tinymce popup window

I would like to create checkbox in popup window using tinymce. I can create listbox in popup window but cannot create checkbox in it.

var tempGroups = ['Group1', 'Group2', 'Group3', 'Group4'];

var temp = [{
    group: 'Group1',
    title: 'Title1',
    content: '<p>Content1</p>',

 }, {
    group: 'Group1',
    title: 'Title1-1',
    content: '<p>Content11</p>',

 }, {
    group: 'Group2',
    title: 'Title2',
    content: '<p>Content2</p>'

 }, {
    group: 'Group2',
    title: 'Title2-1',
    content: '<p>Content22</p>'
 }, {
    group: 'Group3',
    title: 'Title3-1',
    content: '<p>Content33</p>'
 }, {
    group: 'Group4',
    title: 'Title4',
    content: '<p>Content4</p>'
 }, {
    group: 'Group4',
    title: 'Title4-1',
    content: '<p>Content44</p>'
 }];

var tempGroupName;
var menuItems = [];

function createTempMenu(editor) {
    for (i = 0; i < tempGroups.length; i++) {
        var tempArray = [];
        tempArray[i] = [];
        tempGroupName = tempGroups[i];
        for (j = 0; j < temp.length; j++) {
            if (temp[j].group == tempGroupName) {

                tempArray[i].push({

                    text: temp[j].title,
                    content: temp[j].content,
                    //  type: 'checkbox',

                    onclick: function () {
                        alert(this.settings.content);
                    }
                });

            }
        }
        menuItems[i] = {

            text: tempGroupName,
            menu: tempArray[i],


        };
    }
    return menuItems;
}



tinymce.init({
    selector: "textarea",
    setup: function (editor) {
        editor.addButton('button', {
            type: 'menubutton',
            text: 'button',
            icon: false,

            menu: [
                {
                    text: 'Customer List',
                    onclick: function () {

                        editor.windowManager.open({
                            title: 'Customer Name',
                            width: 200,
                            height: 100,

                            items: [
                                {
                                    type: 'listbox',
                                    value: 0,
                                    label: 'Section: ',
                                    values: createTempMenu(editor),
                                    body: [
                                        {
                                            type: 'checkbox',
                                            label: 'Section: ',
                                            // text: "new",
                                            values: createTempMenu(editor),


                                                        }],

                                    onsubmit: function (e) {
                                        
                                    }
                                                }]
                        });
                    }
                            }]

        });
    },
    toolbar: " button "
});


    

Any help will be appreciated.



Solution 1:[1]

An old question just found it. If you're still looking for an answer you can refer to their reference Here it has further details

There's a type called checkbox in tinymce

                    {
                        type   : 'checkbox',
                        name   : 'choose the name',
                        label  : 'choose a label',
                        text   : 'the text near the checkbox',
                        checked : false
                    },

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 David Buik