Editor Window Customization

How to add a new button with an editor window inside the footer. We have two buttons save and cancel with the editor window, Could you please help me for adding a new custom button.



1 Reply

VD Vinitha Devi Murugan Syncfusion Team August 10, 2021 07:51 AM UTC

Hi Rahul, 
 
Greetings from Syncfusion Support. 
 
We have validated your reported query “adding a new custom button in editor” and achieved it by making use of below code in popupOpen event. We have prepared a sample for your reference which can be viewed from the following link.  
 
 
  popupOpen: (argsany=> { 
    if (args.type === 'Editor') { 
      if (flag) { 
        let dialogObj = args.element.ej2_instances[0]; 
        let buttons = dialogObj.buttons; 
        let tmp = buttons[0]; 
        buttons[0] = { 
          buttonModel: { content: 'Alert' }, 
          click: alert.bind(this) 
        }; 
        buttons.push(tmp); 
        dialogObj.setProperties({ buttons: buttons }); 
        addClass( 
          [dialogObj.element.querySelector('.e-event-delete')], 
          'e-disable' 
        ); 
        flag = false; 
      } 
    } 
  } 
 
Kindly try with the above sample and get back to us if you need any further assistance. 
 
Regards, 
Vinitha 
 


Loader.
Up arrow icon