Ju99ernaut / grapesjs-template-manager

Template and page manager for grapesjs
MIT License
82 stars 36 forks source link

Add save(update) button in panels #40

Closed MatiasMarazza closed 1 year ago

MatiasMarazza commented 1 year ago

Hi! I want to add a save button in my top panels, it should just update the project data, so i don't depend only on stepsBeforeSave for updating that data. There is any command or proper way to do this?

MatiasMarazza commented 1 year ago

It was simpler than i thought! I added a buttton like this

editor.Panels.addButton('options', [
  { id: 'save', className: 'fa fa-floppy-o icon-blank',
  command:() => { editor.store() },
  attributes: { title: 'save' } }, ]);

Cheers!