Set the Cancel button as default in the Editor modal

Set the Cancel button as default in the Editor modal

volilvivvolilviv Posts: 1Questions: 1Answers: 0
edited February 2016 in Free community support

I have several tables on the page. So to get a cancel button in the editor modal for each table, I write the following code (also for "edit" and "delete" in accordance).

editor.create({
    title: 'Create new record',
    buttons: [
        'Create', 
        {
            label: 'Cancel',
            fn: function() {
                this.close();
            }
        }
    ]
});

Is it possible to change code in one place so that the editor modal always contains the cancel button?

This discussion has been closed.