Issue #958Opened March 16, 2018by rajatkumcom1 reactions

Unable to create a popup by using bootbox or any other way.

Question

Code SnippetTEXT
Unable to create bootbox popup.
Below is my code:-
var blockManager = editor.BlockManager;

blockManager.add('design', {
	label: 'Design',
	content: {
            script: "bootbox.alert('Hi'); console.log('the element', this)",
//            script: function () {
                    
//                    bootbox.alert({
//                        title: 'A custom dialog with buttons and callbacks',
//                        message: "<p>This dialog has buttons. Each button has it's own callback function.</p>",
//                    });

//              },
            // Add some style just to make the component visible
            style: {
              width: '100px',
              height: '100px',
              'background-color': 'red',
            }
          },
        attributes: {class: 'gjs-fonts gjs-f-image gjs-block gjs-one-bg gjs-four-color-h'},
});

I have also attached the required js in init:-
    canvas: {
    scripts: ['https://code.jquery.com/jquery-1.12.3.min.js', 
                'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js',
                DrupalBasePath + '/sites/all/modules/custom/landing_builder/bootboxjs/bootbox.min.js'
            ]

Answers (3)

rajatkumcomMarch 16, 20181 reactions

Got my answer- I have used parent keyword. parent.bootbox.alert('Hi');

rajatkumcomMarch 16, 20180 reactions

screenshot from 2018-03-16 19-09-36

lock[bot]September 17, 20190 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.