guideDialog mode

To open CKBox in dialog mode, set the dialog configuration option to true. For more verbose configuration this option allows also for passing an object, which allows for more control over the opened dialog window. For details, please refer to the dialog option description.

CKBox.mount(document.querySelector('#ckbox'), {
    tokenUrl: 'https://your.token.url',
    dialog: true,
    assets: {
        // Callback executed after choosing assets
        onChoose: (assets) => {
            assets.forEach((asset) => {
                console.log(asset.getUrl());
            })
        }
    }
});

Click on the button below to open CKBox in dialog mode.