grapesjs icon indicating copy to clipboard operation
grapesjs copied to clipboard

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

Open rajatkumcom opened this issue 8 years ago • 3 comments

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: "

This dialog has buttons. Each button has it's own callback function.

", // });

// }, // 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' ]

rajatkumcom avatar Mar 16 '18 13:03 rajatkumcom

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

rajatkumcom avatar Mar 16 '18 13:03 rajatkumcom

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

rajatkumcom avatar Mar 16 '18 15:03 rajatkumcom

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.

lock[bot] avatar Sep 17 '19 20:09 lock[bot]